Howdy to all!
That is a tutorial on Chip, and her backpack Pochet CHIP. What is CHIP? CHIP is the smallest Linux-based computer created by Next Thing through a Kickstarter campaign. See the link to view all the features. CHIP has all the necessary components to work, including a WiFi and Bluetooth onboard. What you can do with CHIP? All that you can do with a computer. Yes! Pocket CHIP, is a board that have all the component like keyboard, screen and GPIO port to work with CHIP. You can see the video below, and you can see the features of CHIP's.Step 1: The features of CHIP and Pocket CHIP
The features of CHIP are: Allwinner R8 processor, Realtek RTL8723BS WiFi and Bluetooth module, 4 Gb NAND, USB connection, TRRS/AV connection. CHIP supports 802.11b/g/n using the built-in WiFi, and the Bluetooth 4.0 LE standard using the built-in Bluetooth.
Pocket CHIP is a board that has a keyboard, a touchscreen, a battery and a GPIO port. Now my CHIP has a firmware to work with Pocket CHIP. The standard CHIP does not have the same app as the CHIP that works with Pocket CHIP, but has a different Linux distro. The Linux distro on CHIP is Debian-8 (Jessie).Step 2: The applications of Pocket CHIP ...for now
The app that is pre-installed on the Linux distro, for now, is the Linux Terminal, Pico-8, a platform and much more. With Pico-8 you can play the games that the Pico-8 community share with the world, and you can also create very geeky games, like Atari and 8-bit style games.
With Pocket CHIP you can create music! Yeah! There is a pre-installed app that you can use to play sound like a synthesizer, and you can create sound or noise like me.
Also there's Write. With write you can write. Yes! In the photos, you can see the browser file and the helper. But for me the best app is the Terminal. Terminal is a standard Linux Terminal. I now can use my Raspberry Pi with Chip. This is a very portable mode to use Raspberry Pi.Step 3: Blink an LED with Pocket CHIP
Like I have just said, you can use the GPIO pinout of CHIP that command all the hardware stuff that you can catch somewhere. Good! All the trips start from a place. This place for us is an LED. Yes, the LED is the "Hello World" for the electronics. Okay, now less words, more facts. You can use a red LED like in the photo. Use a resistor. And see the instructions.
Now switch on your Pocket CHIP and install CHIP_IO library on your Pocket CHIP. To do this, write these commands in a Terminal window:
sudo ntpdate pool.ntp.org sudo apt-get update sudo apt-get install git build-essential python-dev python-pip -y git clone git://github.com/xtacocorex/CHIP_IO.git cd CHIP_IO sudo python setup.py install cd .. sudo rm -rf CHIP_IO
Now you have CHIP_IO on your Pocket CHIP.Step 4: Write a python program to blink an LED
Nou you can open a Terminal window, and write these command:
sudo nano blink.py
After this, the screen changes and you can write this commands:
import CHIP_IO.GPIO as GPIO import time GPIO.cleanup() GPIO.setup("XIO-P2", GPIO.OUT) print "Toggling XIO-P1 10 times..." for i in range(0,10): GPIO.output("XIO-P2", GPIO.LOW) time.sleep(0.1) GPIO.output("XIO-P2", GPIO.HIGH) time.sleep(0.1) GPIO.cleanup()
After, you can save this by clicking Ctrl+X. Write Y twice, and ta-da! You have written the your first Python program.Step 5: Connect the hardware
Now is the hardware portion. You can see the photo. Connect the positive pin's of the LED on the 5 volt GPIO pin. The negative pin of LED to the resistor, and the resistor on the GPIO 1. The positive pin of an LED is longer than the negative. This configuration is good for the Pocket CHIP. Remember to always use a resistor, otherwise you can burn the Pocket CHIP.Step 6: Launch the program
Now you can launch the program by terminal window. Open the Terminal, and write
sudo python and the name of the file written before.
sudo python blink.py