How to setup Raspberry Pi Pico using Thonny IDE on windows and Blink onboard LED

Posted

in

by

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:

  1. Connect your Raspberry Pi Pico to your Windows computer using a micro USB cable.
  2. Open Thonny IDE on your Windows computer.
  3. Click on the “File” menu and select “New”.
  4. 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)
  1. Save the file with a meaningful name and the “.py” extension.
  2. Click on the “Run” menu and select “Run current script” or press the “F5” key.
  3. 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.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *