loading

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.

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

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 blink.py

<p>Now I have an alert when rc.local end its tasks :)</p>
Woooo great!
<p>Hey Masteruan, can you help me?</p><p>If I interrupt the script while running I get this error next time I try it:</p><p> GPIO.setup(&quot;XIO-P2&quot;, GPIO.OUT)</p><p>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))</p><p>Is there a way to correct this?</p><p>Thank you!</p>
<p>Did you figure this error out?</p>
<p>I think that is a permissions problem</p>
<p>Hi dear,</p><p>try to read this: https://bbs.nextthing.co/t/solved-special-permissions/1797</p>
<p>Thanks for the post. </p><p>I'm getting: ImportError: No module named CHIP_IO.GPIO. I have a CHIP_IO folder and followed the install steps correctly. Any suggestions?</p>
<p>What python version are you using? python3 doesnt install it's gpio package through that, so it's only installed in python 2.x</p>

About This Instructable

5,594views

15favorites

License:

More by masteruan:Meteo Node IoT Smart Meteo Station O-Zone: DIY Bluetooth Battery Lamp Omega Onion2 OLED Screen Show IP and LAN Name 
Add instructable to: