16 lines
377 B
Python
Executable File
16 lines
377 B
Python
Executable File
#import the GPIO and time package
|
|
import RPi.GPIO as GPIO
|
|
import time
|
|
GPIO.setmode(GPIO.BOARD)
|
|
led_pin_board=16
|
|
led_pin_bcm="GPIO23"
|
|
GPIO.setup(led_pin_board, GPIO.OUT)
|
|
# loop through 50 times, on/off for 1 second
|
|
for i in range(50):
|
|
print("Flash")
|
|
GPIO.output(led_pin_board,True)
|
|
time.sleep(1)
|
|
GPIO.output(led_pin_board,False)
|
|
time.sleep(1)
|
|
GPIO.cleanup()
|