Giovanni Gentile
Published © GPL3+

Pocket Chip: How to Blink an LED

That is a tutorial on Chip and her backpack, Pocket CHIP. What is CHIP? CHIP is the smallest Linux-based computer. Let's blink an LED!

BeginnerProtip30 minutes1,495
Pocket Chip: How to Blink an LED

Things used in this project

Hardware components

Pocket C.H.I.P.
Pocket C.H.I.P.
×1
LED (generic)
LED (generic)
×1
Resistor 100 ohm
Resistor 100 ohm
×1

Story

Read more

Code

The code of project blink.py

Python
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()

Credits

Giovanni Gentile

Giovanni Gentile

31 projects • 63 followers
Graduated in Psychology expert in new technologies and communication, with expertise in electronics, automation and home automation.

Comments