Virtual Online Raspberry Pi Pico Simulator - Blink an LED

by sharepksn in Circuits > Raspberry Pi

71 Views, 1 Favorites, 0 Comments

Virtual Online Raspberry Pi Pico Simulator - Blink an LED

2021-05-12_16h09_16.png

Welcome to my tutorial. In this tutorial, we will see how to blink an LED using the Raspberry Pi Pico online Simulator. Let us begin!

A - Editor window where you write code

B - Simulator window

C - RUN simulation button
D - Add Item Button
E - LED
F- Wires

G - Rspberry Pi Pico Simulator

Supplies

online free simulator: www.wokwi.com

Add an LED

wokwi raspberry pi pico simulator1.gif
  1. To add the LED, click on the purple Plus icon in the simulator window.
  2. You will get many options.. Choose the LED.
  3. By default color of the LED is Red. you can change the color of the LED in the diagram.json file if you want!

Add the Raspberry Pi Pico Element

wokwi raspberry pi pico simulator2.gif
  1. The Arduino and Pico boards are not in the "ADD" icon list. to add the boards, you need to go to the diagram.json file.
  2. you can follow the image. visit https://docs.wokwi.com for the complete list

Connect the LED and the Raspberry Pi Pico Using Wires

wokwi raspberry pi pico simulator3.gif
  1. Click and drag is supported
  2. you can drag the elements to the right position
  3. Click on the pin of the LED using your mouse. Then complete the routing by clicking on the destination pin
  4. Repeat the same for the other pin of the LED
  5. image shows how it will look

The Software

wokwi raspberry pi pico simulator5.gif

The software is simple

We use the same style as Arduino programming in this example

  1. The LED is connected to pin number 2 (GPIO 1) of the Raspberry Pi Pico
  2. The SETUP() function and LOOP() function works the same as in the Arduino environment

The code is shared below as well

#define RED 1

void setup() {
  pinMode(RED, OUTPUT);
}

void loop() {

  digitalWrite(RED, HIGH);
  delay(2000);

  digitalWrite(RED, LOW);
  delay(2000);
}

Raspberry Pi Pico Simulator in Action - Execution

wokwi raspberry pi pico simulator6.gif

Click on the RUN simulation button to see the Raspberry Pi Pico simulator in action! The LED will turn off and turn on every 2 seconds.

Support - Feedback - Suggestions

2021-05-12_16h21_33.png
  1. Discord channel
  2. The link to the project online -

    https://wokwi.com/arduino/projects/298368337072620...

  3. Documentation of wokwi Simulator

Please visit my other articles as well

https://www.instructables.com/member/sharepksn/