how to make 2 lights blink with the gpio pins with python

Solutions on MaxInterview for how to make 2 lights blink with the gpio pins with python by the best coders in the world

showing results for - "how to make 2 lights blink with the gpio pins with python"
Carolina
13 Jan 2020
1import RPi.GPIO as GPIO # IMPORTANT: remember to change the gpio pin (18) also it needs to be programmed in Thonny Python IDE
2import time #used in raspberry pi model 4
3
4GPIO.setwarnings(False) #NOTE: raspberry pi could be updated, and you might need to change your code
5GPIO.setmode(GPIO.BCM) 
6GPIO.setup(18, GPIO.OUT)
7
8
9while True:
10      GPIO.output(18, True) 
11      time.sleep(1) 
12      GPIO.output(18, False) 
13      time.sleep(1) 
Luca
24 Jul 2016
1while True:
2    import RPi.GPIO as GPIO
3    import time
4    
5    x = (0.3)
6    
7    GPIO.setmode(GPIO.BOARD)
8    GPIO.setup(3, GPIO.OUT)
9    GPIO.setup(5, GPIO.OUT)
10    
11    GPIO.output(3, GPIO.LOW)
12    GPIO.output(5, GPIO.HIGH)
13    time.sleep(x)
14    GPIO.output(3,GPIO.HIGH)
15    GPIO.output(5, GPIO.LOW)
16    time.sleep(x)
17    
18GPIO.cleanup()
19
queries leading to this page
raspberry pi 4 led blink coderaspberry pi program for led blinkingwrite a program to blink led connected to gpio 20 402hzrasbery pi 3 blinking red lightblink led using raspberry pi 3raspberry pi 3 blinking red lightraspberry pi led blinkpython code to blink led in raspberry pibuild control an led blinking raspberry piraspberry pi blinking raspberry pi orange led not blinkingraspberry pi gpio blink ledprogramming raspberry pi led blink with pcraspberry pi led blink circuitmake led blink on raspberry pi 4raspberrypi blinking ledprogramme for blinking a led in pythonraspberry pi 4 blinking red lightled blinking using raspberry picoblink led on raspberry piraspberry pi blinking led versionraspberry pi blinking red lighthow to make 2 lights blink with the gpio pins with pythonpython blinkalternate blinking led raspberry pi picoraspberry pi 4 display blinkingraspberry pi 3 led blink python codehow to blink a led in raspberry pidraw the circuit diagram to connect three led in series to raspberry piraspberry pi 3 blinking board ledraspberry pi 3 led blink codepython raspberry pi blink ledled blink raspberry pi pythonraspberry pi ethernet blinking yellowled blink program for raspberry piblink led with raspberry pihow to implement blink in pythonblinking led raspberry piled blinking using raspberry piled blinking code for raspberry pi pythonled blinking raspberry piblinking led python raspberry piraspberry pi red light blinkingled blinking code for raspberry piblinking lights in pythonled blinking program using raspberry piraspberry pi blink ledpython led blinkpi red light blinkingraspberry pi led blink codeblinking in built led raspberry piraspberry pi act light is blinkingled blink raspberry piraspberrypi blink ledmake led blink on raspberry piraspberry pi python make led blinkraspberry pi green led not blinkingblink raspberry piprogramming raspberry pi led blink with laptopled blinking simultaneously using raspberry piled blinking code in raspberry pired light blinking raspberry piraspberry pi blinking led circuit diagramrapserry pi led blinkhow to blink led with raspberry pi5 times led blinking in rpipython script raspberry pi leduse gpio for blinking lightsraspberry pi led blink python coderaspberry pi 3 led blinkblink in rpi for loophow to make a led flicker with raspberry pipython raspberry gpio blinklight an led through python programraspberry pi red and green light blinkingrpi blinking ledhow to blink an led using raspberry pi and pythonpython program for led blink gpio raspberry pi blinking ledgpio led code python draw the circuit diagram to connect led to raspberry pi and write a python script to light an led raspberry pi3 blibking bulbraspberry pi 3 blinking led error codewrite a python program to turn on an led for 10 sec after every 2 seconds using raspberry pi blink led rpiraspberry pi 4 blink ledblink led raspberry piblinking pythonraspberry red light blinkingraspberry pi 3 b 2b python led is not blinking control led with raspberry pi using pythonblink in rpipython programming to gpio tatatatata blink ledblink in pythonpython raspberry led blinkmake raspberry pi led blink on boardraspberry pi blinking led version 13 5 3 python raspberry pi blink ledblinking led using raspberry pipython programming to gpio blinking led like blink blink blinnnnnnnnkblinking an led with raspberry pihow to make 2 lights blink with the gpio pins with python