Files

15 lines
377 B
Python
Raw Permalink Normal View History

2026-04-14 23:55:26 +02:00
#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()