Pocket Chip: How to Make Blinking a Led

by masteruan in Circuits > Gadgets

9575 Views, 19 Favorites, 0 Comments

Pocket Chip: How to Make Blinking a Led

Pocket CHIP.png
P7020001.JPG
5777d5d54936d4f6ef000f77.jpeg
P7020012.JPG

Howdy to all!!

That is an Instructables on Chip, and her backpack Pochet CHIP. What is CHIP? CHIP is a smallest computer Linux based created by Next Thing by a Kickstarter campaign's. See the link to view all the features (http://docs.getchip.com/chip.html#installing-c-h-i-p-sdk). CHIP have all the components to work. Have a Wifi and Bluethooth 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.

The Features of CHIP and Pocket CHIP

Blink a led with a Pocket CHIP
P7020008.JPG
chip_mechanical.jpg
P7020011.JPG
chip_schematic.jpg
P7020005 copia.JPG
P7020004 copia.JPG
P7020007.JPG

The features of CHIP are: Allwinner R8 processor, Realteck RTL8723BS wifi and Bluethooth 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 have a keyboard a touch screen a battery and a GPIO port. Now my CHIP have a firmware to work with Pocket CHIP. The standard CHIP not have the same app of the CHIP that work with Pocket CHIP, but have a different Linux distro.
The Linux distro on CHIP is Debian-8 (Jessie).

The Applications of Pocket CHIP...for Now

P7020013.JPG
P7020014.JPG
P7020016.JPG

The app that are pre-installed on the Linux distro, for now, are 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 creating very geek games. Like Atari, and 8-bit style games.

With Pocket CHIP you can create music! Yeah! There is a preinstalled app that you can use to play sound like a synthesizer, and you can create sound, or noise like me...

Also are 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 by Chip. This is a very portable mode to use Raspberry Pi.

Blink a Led With Pocket CHIP

P7020006.JPG
P7020015.JPG
P7020010.JPG

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 a led. Yes, the led is the "Hello World" for the electronics. Ok now less words, more facts.
You can use a red led like in photo. Use a resistor. And see the instructions.

Now switch on your Pocket CHIP and install CHIP_IO library on your Pocket CHIP. For 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.

Write a Python Program to Blink a Led

Nou you can open a Terminal window, and write these command:

sudo nano blink.py

After this the screen chance 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 tataaa you have wrote the your first Python program.

Downloads

Connect the Hardware

P7020004.JPG
P7020005.JPG

Now is the hardware moment. You can see the photo. Connect the positive pin's of the led on the 5 volt GPIO pin's. The negative pin of led to the resistor, and the resistor on the GPIO 1.
The positive pin of led is more long that the negative. This configuration is good for the Pocket CHIP. Remember use always a resistor, otherwise, you can burn the Pocket CHIP.

Launch the Program

Now you can launch te program by terminal window. Open the Terminal, and write sudo python and the name of the file written before.
sudo python blink.py