Created
June 20, 2017 11:16
-
-
Save waday/ec1e6c457f0de05a25e79fb7fe2a9d11 to your computer and use it in GitHub Desktop.
pocket chipでLチカ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment