[Add] First commit
This commit is contained in:
18
Pioneer600_code/LED/python/led.py
Normal file
18
Pioneer600_code/LED/python/led.py
Normal file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding:utf-8 -*-
|
||||
import RPi.GPIO as GPIO
|
||||
import time
|
||||
|
||||
LED = 26
|
||||
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setup(LED,GPIO.OUT)
|
||||
try:
|
||||
while True:
|
||||
GPIO.output(LED,GPIO.HIGH)
|
||||
time.sleep(1)
|
||||
GPIO.output(LED,GPIO.LOW)
|
||||
time.sleep(1)
|
||||
except:
|
||||
print("except")
|
||||
GPIO.cleanup()
|
||||
Reference in New Issue
Block a user