Last active
August 17, 2017 12:03
-
-
Save tex2e/3b2e1a006bbdd1dfde387a654facf3e9 to your computer and use it in GitHub Desktop.
Raspberry Pi の LED 点滅
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
#!/usr/bin/python | |
import RPi.GPIO as GPIO | |
import time | |
port = 2 | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(port, GPIO.OUT) | |
while 1: | |
GPIO.output(port, True) | |
time.sleep(1.0) | |
GPIO.output(port, False) | |
time.sleep(1.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment