Introduction: Pocket Chip: How to Make Blinking a Led

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 ( 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.

Step 1: The Features of CHIP and Pocket CHIP

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).

Step 2: The Applications of Pocket CHIP...for Now

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.

Step 3: Blink a 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 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

sudo apt-get update

sudo apt-get install git build-essential python-dev python-pip -y

git clone git://


sudo python install

cd ..

sudo rm -rf CHIP_IO

Now you have CHIP_IO on your Pocket CHIP.

Step 4: Write a Python Program to Blink a Led

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

sudo nano

After this the screen chance and you can write this commands:


import time


GPIO.setup("XIO-P2", GPIO.OUT)

print "Toggling XIO-P1 10 times..."

for i in range(0,10):

GPIO.output("XIO-P2", GPIO.LOW)


GPIO.output("XIO-P2", GPIO.HIGH)



After you can save this by clicking Ctrl+x
Write Y twice, and tataaa you have wrote the your first Python program.

Step 5: Connect the Hardware

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.

Step 6: 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


mneto5 made it!(author)2016-08-26

Now I have an alert when rc.local end its tasks :)

masteruan made it!(author)2016-08-26

Woooo great!

mneto5 made it!(author)2016-09-05

Hey Masteruan, can you help me?

If I interrupt the script while running I get this error next time I try it:

GPIO.setup("XIO-P2", GPIO.OUT)

RuntimeError: Error setting up channel XIO-P2, maybe already exported? (gpio_export: could not write '410' to /sys/class/gpio/export (Device or resource busy))

Is there a way to correct this?

Thank you!

NickS277 made it!(author)2016-11-20

Did you figure this error out?

masteruan made it!(author)2016-11-21

I think that is a permissions problem

masteruan made it!(author)2016-11-21

Hi dear,

try to read this:

RichardE55 made it!(author)2016-08-04

Thanks for the post.

I'm getting: ImportError: No module named CHIP_IO.GPIO. I have a CHIP_IO folder and followed the install steps correctly. Any suggestions?

masteruan made it!(author)2016-11-04

What python version are you using? python3 doesnt install it's gpio package through that, so it's only installed in python 2.x

About This Instructable




More by masteruan:Arduino Edit, Compile, Upload, Read Serial by LInux Pocket ChipMeteo Node IoT Smart Meteo StationO-Zone: DIY Bluetooth Battery Lamp
Add instructable to: