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 minutes3,097
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

36 projects • 98 followers
Graduated in Psychology Artificial Intelligence department. Expert in electronics, automation and IoT. Now working on VR-AR experiences.

Comments