To check double LED blink using Raspberry Pi Pico
Required Components
- Led _ 2 no
- Raspberry Pi Pico board _ 1 no
- Connecting wires _ 1 set
Circuit
Steps
- Make sure the components are working properly.
- Connect Led GND pins to Raspberry Pi Pico GND pins respectively.
- Connect Raspberry Pi Pico GP2, GP20 pins to the each LED anode pin.
- Check the Python program.
- Check the circuit connections.
- Run the Python program.
Python Program
from machine import Pin
import utime #timer
led1=Pin(2,Pin.OUT)
led2=Pin(17,Pin.OUT)
while(True):
led1.value(1)
led2.value(1)
utime.sleep(2) #delay of 1 sec
led1.value(0)
led2.value(0)
utime.sleep(2)