Raspberry Pi Pico வை பயன்படுத்தி இரண்டு LED ஐ ஒளிர வைப்பது
Required Components
- Led-2 no
- Raspberry Pi Pico board-1 no
- Connecting wires-1 set
Circuit
Steps
- நாம் பயன்படுத்தும் உபகரணங்கள் சரியாக வேலை செய்கிறதா என்பதை உறுதி செய்து கொள்ளவும்.
- 2 LED வில் உள்ள ground இணைப்புகளை Raspberry Pi Pico வில் உள்ள ground உடன் இணைக்க வேண்டும்.
- Raspberry Pi Pico GP2, GP20 உடன் 2 LED + யை இணைக்க வேண்டும்.
- Python program ஐ சரி பார்க்க வேண்டும்.
- மின்சுற்றை சரி பார்க்க வேண்டும்.
- 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)