Skip to content

Instantly share code, notes, and snippets.

@tex2e
Last active August 17, 2017 12:03
Show Gist options
  • Save tex2e/3b2e1a006bbdd1dfde387a654facf3e9 to your computer and use it in GitHub Desktop.
Save tex2e/3b2e1a006bbdd1dfde387a654facf3e9 to your computer and use it in GitHub Desktop.
Raspberry Pi の LED 点滅
#!/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