First you have to install micropython on your raspberry pi pico board.
Follow the steps shown in the video.
To blink the onboard LED you can follow these steps:
- Connect your Raspberry Pi Pico to your Windows computer using a micro USB cable.
- Open Thonny IDE on your Windows computer.
- Click on the “File” menu and select “New”.
- In the new window, enter the following code:
import machine
import time
led_onboard = machine.Pin(25, machine.Pin.OUT)
while True:
led_onboard.toggle()
time.sleep(1)
- Save the file with a meaningful name and the “.py” extension.
- Click on the “Run” menu and select “Run current script” or press the “F5” key.
- Thonny IDE will run the code and the onboard LED of Raspberry Pi Pico will start blinking at a frequency of 1 second.
That’s it! You have successfully blinked the onboard LED of Raspberry Pi Pico using Thonny IDE on Windows.
Leave a Reply