Created
July 10, 2024 19:12
-
-
Save SaraM92/cf1832058b0641349ae9cb5fcc804463 to your computer and use it in GitHub Desktop.
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
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setwarnings(False) | |
GPIO.setup(18,GPIO.OUT) | |
while True: | |
GPIO.output(18,GPIO.HIGH) | |
print("LED is ON") | |
time.sleep(1) | |
GPIO.output(18,GPIO.LOW) | |
print("LED is OFF") | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment