Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (2025)

This tutorial is a Guide For The Raspberry Pi Pico Simulator (Wokwi). The RP2040-based Raspberry Pi Pico boards can be programmed using (C/C++ SDK, MicroPython, CircuitPython, and Rust). You can find navigation buttons on the left sidebar to go to the Raspberry Pi Pico tutorials series using the programming language you prefer.

In this tutorial, we’ll get an overview of the Wokwi simulator features for simulating Raspberry Pi Pico RP2040-based projects. We’ll simulate both the Raspberry Pi Pico & Pico W boards using (MicroPython, CircuitPython, Arduino C, and C/C++ SDK). You’ll get a project template for each programming language with the Raspberry Pi Pico & Pico W boards. Without further ado, let’s get right into it!

Table of Contents

  1. Wokwi Raspberry Pi Pico Simulator Introduction
  2. Drawing Circuits in Wokwi
  3. Using Wokwi Virtual Serial Monitor
  4. Using Wokwi MicroPython REPL Prompt
  5. Using Wokwi Virtual Logic Analyzer
  6. Adding Libraries To Wokwi
  7. Wokwi Project Templates For Raspberry Pi Pico
  8. Raspberry Pi Pico MicroPython Projects Simulation
  9. Raspberry Pi Pico CircuitPython Projects Simulation
  10. Raspberry Pi Pico Arduino IDE Projects Simulation
  11. Raspberry Pi Pico C/C++ SDK Projects Simulation
  12. Concluding Remarks

Wokwi Raspberry Pi Pico Simulator Introduction

Simulating Raspberry Pi Pico projects can be really helpful especially when you’re just getting started. This step is not mandatory, however, running your project in a simulator environment will help you catch and fix some logic errors in the code or in the circuit wiring connections.

As of writing this tutorial, there is only one Raspberry Pi Pico simulator that looks very promising: the online Wokwi simulator tool. We’ll be using this Raspberry Pi Pico simulator environment in a lot of example projects through this Raspberry Pi Pico tutorials series. Therefore, in this tutorial, we’ll explore the capabilities of this tool and prepare some project templates to accelerate the getting-started process for ourselves in future demos.

Wokwi is free to use however they provide a paid subscription plan should you want to support their work and also get access to advanced features and influence their development tasks roadmap via a power-user voting system. The Wokwi simulator has a lot of features that include:

  • Simulate a wide variety of microcontrollers: Arduino, ESP32, Raspberry Pi Pico, STM32, and many others
  • A handful of sensors, modules, and read-to-use simulated hardware libraries
  • Virtual test equipment like logic analyzer, serial monitor, WiFi simulation, and more
  • Debugging in simulation environment & VS code integration (beta features)

There is more interesting stuff yet to be added and discovered to this amazing simulation environment.

Drawing Circuits in Wokwi

The Wokwi simulator has a very intuitive GUI environment to help you easily draw your system schematic diagram with the target microcontroller board (Raspberry Pi Pico, Pico W, Arduino, or whatever). Everything on the graphical diagram is represented in a text format in thediagram.json file tab.

The “+Button in the top menu of the simulator window will allow you to add devices to the simulation environment (breadboards, sensors, modules, LEDs, Buttons, etc). However, things like the target microcontroller board (Pi Pico, Pico W, or others) are only added by editing thediagram.json file.

There are some key bindings and shortcuts that will help you accelerate the process of schematic drawing & editing in Wokwi. All of these are illustrated on this page, you may need to use it as a reference as well.

Using Wokwi Virtual Serial Monitor

The Serial Monitor provides a way to send/receive information to/from your microcontroller. You can use it to print debug messages from your firmware or to send commands that control your firmware behavior.

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (1)

❕ Note

The serial monitor will only show once you print some output from your program. To change this behavior, configure the serial monitor’s settings in the diagram.json file.

Also, note that the baud rate must be set to 9600bps. This is hard-coded in the simulator, and using a different value will get you garbage in the serial monitor.

This is the Wokwi Virtual Serial Monitor reference page to help you learn more about configuring it to suit your needs. Especially if your microcontroller supports multiple UART ports and you’d like to use a specific one for the serial port, or even if it doesn’t have a serial UART port you can still use a SoftwareSerial implementation to make it work.

Using Wokwi MicroPython REPL Prompt

All MicroPython projects must include amain.py file. MicroPython will automatically load and execute the code frommain.py when you start the simulation.

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (2)

Wokwi copies all the project files into the Raspberry Pi Pico’s flash filesystem. This means your project can include additional Python modules and you can import them frommain.py or from the interactive REPL. REPL stands for Read-Evaluate-Print-Loop which is the interactive MicroPython prompt that we typically use to test out Python code, run commands, and see the results immediately.

When the code inmain.py terminates (or you interrupt it with Ctrl+C), you’ll get into the MicroPython REPL. Typehelp() for the MicroPython API list. To paste code into the REPL type (Ctrl+E) and enter paste mode.

Using Wokwi Virtual Logic Analyzer

There is also another extremely helpful tool in the Wokwi simulator environment which is the virtual Logic Analyzer. You can add it to the simulation diagram and use it to monitor up to 8 digital signals at once. Below is an example of toggling an LED pin every 100ms with the Raspberry Pi Pico and I’m connecting the output pin to the logic analyzer.

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (3)

After running the simulation, the logic analyzer will keep registering samples until you terminate the simulation session. After terminating the simulation, a file calledwokwi-logic.vcd will be automatically downloaded to your PC. This is the raw sampled data from the logic analyzer, to view it we’ll use the PulseView free software that you can easily download and install from this link.

Open PulseView software and click on the small arrow beside the Open button at the top. Then select “Import Value Change Dump Data” and navigate to the file generated from the Wokwi simulation which is calledwokwi-logic.vcd.

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (4)

Once you’ve selected the VCD file, there’ll be another dialog with import options:

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (5)

Unfortunately, the default options usually cause PulseView to consume a lot of RAM and become laggy. You can reduce memory usage by setting the Downsampling factor. A value of 50 should work for most use cases. The following table lists some common values:

Downsampling FactorSampling RateUse Case
10001MHzLow-Frequency Digital Signals / Long Recordings (10+ minutes)
5020MHzCommon Digital Signals (UART, SPI, I2C, PWM, WS2812, etc.)
10100MHzHigh-Speed Signals (10MHz+)
11GHzVery High-Speed Signals (100MHz+)

After confirming the import options, you should see the imported signals on the screen. The signal names will be “logic.D0”, “logic.D1”, etc. Use the “Show Cursors” tool to place cursors on the signal to measure its pulse width. Obviously, it turned out to be 100ms exactly as we’ve set the toggle delay in our code.

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (6)

❕ Note

The PulseView software has an amazing Digital Protocol Signal Decoder that will help you decode various protocols like USB, CAN, LIN, MIDI, I2S, IR Remote, and much more.

Adding Libraries To Wokwi

You can add third-party libraries to your Wokwi project simulation environment using the “Library Manager” tab in the code editor. Click on the “+” button and search for the library you’d like to add. You can even upload your own (custom) library files to the simulator, but this feature is only available for paid users (at the moment).

This is a detailed guide for adding libraries to Wokwi simulation projects if you’re interested in this subject.

Wokwi Project Templates For Raspberry Pi Pico

The next four sections are dedicated to providing you with a basic Wokwi project template for both Raspberry Pi Pico & Pico W boards using the following programming environments: (MicroPython, CircuitPython, Arduino IDE, and C/C++ SDK).

Each project template is a very basic LED blinking example code running on the Raspberry Pi Pico or Pico W board. The board will be mounted on a breadboard to imitate the real hardware environment that we’re using for our Raspberry Pi Pico Programming series of tutorials.

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (7)

The ultimate goal of providing the simulation project templates hereafter in this tutorial is to make it easier for you to get started with your project simulation by just copying the project template to your Wokwi account’s dashboard and you’re good to go and modify the simulation diagram to suit your project.

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (8)

Raspberry Pi Pico Pinout Guide: GPIOs Explained

This article will give more in-depth information about the Raspberry Pi Pico GPIO pins and their functionalities. And how to choose the suitable pins for whatever functionality you’re trying to achieve and know the fundamental limitations of the device with some workaround tips and tricks.

Raspberry Pi Pico MicroPython Projects Simulation

Below are two LED blinking example project templates for the Raspberry Pi Pico & Pico W boards simulation using Wokwi and the MicroPython programming language.

1. Raspberry Pi Pico (MicroPython)

[ Wokwi Project URL ] Raspberry Pi Pico – MicroPython (Project Template)

2. Raspberry Pi Pico W (MicroPython)

[ Wokwi Project URL ] Raspberry Pi Pico W – MicroPython (Project Template)

Raspberry Pi Pico CircuitPython Projects Simulation

Below are two LED blinking example project templates for the Raspberry Pi Pico & Pico W boards simulation using Wokwi and the CircuitPython programming language.

1. Raspberry Pi Pico (CircuitPython)

[ Wokwi Project URL ] Raspberry Pi Pico – CircuitPython (Project Template)

2. Raspberry Pi Pico W (CircuitPython)

Not Yet Supported!

Raspberry Pi Pico Arduino IDE Projects Simulation

Below are two LED blinking example project templates for the Raspberry Pi Pico & Pico W boards simulation using Wokwi and the Arduino C++ programming language.

1. Raspberry Pi Pico (Arduino IDE)

[ Wokwi Project URL ] Raspberry Pi Pico – Arduino IDE (Project Template)

2. Raspberry Pi Pico W (Arduino IDE)

[ Wokwi Project URL ] Raspberry Pi Pico W – Arduino IDE (Project Template)

Raspberry Pi Pico C/C++ SDK Projects Simulation

Below are two LED blinking example project templates for the Raspberry Pi Pico & Pico W boards simulation using Wokwi and C/C++ SDK programming.

1. Raspberry Pi Pico (C/C++ SDK)

[ Wokwi Project URL ] Raspberry Pi Pico – C/C++ SDK (Project Template)

2. Raspberry Pi Pico W (C/C++ SDK)

[ Wokwi Project URL ] Raspberry Pi Pico W – C/C++ SDK (Project Template)

Raspberry Pi Pico Hardware Kit

If you’re looking forward to playing around with the Raspberry Pi Pico board to test its capabilities and features, you may just need to get a single board. Just like this one here. However, if you’d like to follow along with the Raspberry Pi Pico series of tutorials published here on our website, you may consider getting the following items:

2x Pi Pico Boards, 2x Pi Pico W Boards, 4x BreadBoards, Resistors, LEDs, Buttons, Potentiometers, etc. The reason behind getting multiple boards is that we’ll be using one board as a PicoProbe debugger for SWD debugging activities. And at least 2x Pico W boards for IoT wireless applications.

The full kit list of the Raspberry Pi Pico series of tutorials is found at the link below, as well as some test equipment for debugging that you may consider getting for your home electronics LAB.

Concluding Remarks

To conclude this tutorial, we’ll highlight the fact that Raspberry Pi Pico simulation is possible with the Wokwi online simulation environment which can help you get started with Raspberry Pi Pico programming even if you didn’t get your hardware kit yet. There may be some downsides and limitations in some cases but for basic projects simulation, it’s going to help you very well.

Follow this Raspberry Pi Pico Series of Tutorials to learn more about Raspberry Pi Pico Programming in different programming languages’ environments.

If you’re just starting with Raspberry Pi Pico, you should check out the following getting-started guides with the programming language you favor the most. There are 4 variants of the Raspberry Pi Pico tutorials to match your needs and help you along the path that you’re going to choose.

Pico SDK (C/C++)

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (10)
Get Started

Arduino

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (11)
Get Started

MicroPython

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (12)
Get Started

CircuitPython

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (13)
Get Started

Related

Raspberry Pi Pico Simulator Wokwi (MicroPython, Arduino, C SDK) (2025)

FAQs

Can you program Raspberry Pi Pico in C? ›

Programming the Raspberry Pi Pico in C uses the highly popular VS Code as its development environment and shows how to use a Raspberry Pi or a desktop PC running Windows as your development machine.

Does Raspberry Pi Pico support MicroPython? ›

What is MicroPython? MicroPython is a full implementation of the Python 3 programming language that runs directly on embedded hardware like Raspberry Pi Pico. You get an interactive prompt (the REPL) to execute commands immediately via USB Serial, and a built-in filesystem.

Can I use Arduino IDE for Raspberry Pi Pico? ›

It is now possible to program the Raspberry Pi Pico board with Arduino code directly from the Arduino IDE. Adding the support is similar to installing the ESP32 boards via the additional board manager via the Arduino IDE.

What is the best programming language for Raspberry Pi Pico? ›

A Raspberry Pi Pico responds to a variety of coding languages, including C, C++, and MicroPython. MicroPython is a more lightweight and simple version of traditional Python, and it is the most common language used by Raspberry Pi Pico hobbyists.

Can you code in C on Raspberry Pi? ›

For compiling C programs, we use a compiler called gcc because it comes installed on the Raspberry Pi. It has many complicated options which allow us to tailor its output to our needs, however to compile a simple program like the Hello Pi above, it is nicely simple. Just like the functions discussed in C. 1.2 & C.

What is Raspberry Pi Pico good for? ›

From light displays and IoT devices to signage and manufacturing processes, the Raspberry Pi Pico series gives you the power to control countless home, hobby, and industrial operations.

What is the difference between MicroPython and Python? ›

The key difference between Python and MicroPython comes from the fact that they are designed for different purposes. Python is used to write code that runs on powerful processors, whilst MicroPython was designed to be compatible and power microcontrollers and microprocessors.

Why Raspberry Pi Pico is better than Arduino? ›

When it comes to processing power, the Raspberry Pi Pico boasts a dual-core ARM Cortex-M0+ processor running at 133 MHz, making it a formidable contender in the microcontroller arena. On the other hand, Arduino boards vary in terms of processing capabilities, with some featuring simpler architectures than others.

Does Raspberry Pi Pico need OS? ›

No - the Raspberry Pi Pico doesn't run a full desktop operating system like the Raspberry Pi 4, it runs code directly without a desktop interface (similar to how an Arduino board works). To learn more, check out the Raspberry Pi Pico Getting Started page.

Can Raspberry Pi Pico run GUI? ›

A tiny GUI for Raspberry Pi Pico

The pico-widgets for Raspberry Pi Pico is a lightweight graphical user interface (GUI) which is based on Pico Touchscreen SDK https://github.com/RPiks/pico-touchscr-sdk.

How to load MicroPython on raspberry pi pico? ›

Press and hold the BOOTSEL button and then connect the Pico to computer via a Micro USB cable. Release the BOOTSEL button after your Pico is mount as a Mass Storage Device called RPI-RP2. In the bottom right corner, click the interpreter selection button and select Install Micropython.

How do I connect my PI Pico to my computer? ›

Hold down the BOOTSEL button on your Raspberry Pi Pico W. Connect the other end to your desktop computer, laptop, or Raspberry Pi. Your file manager should open up, with Raspberry Pi Pico being show as an externally connected drive. Drag and drop the firmware file you downloaded into the file manager.

How do I run a Python script on Raspberry Pi Pico? ›

Open and Run Script Directly
  1. Open Thonny IDE and plug the Pico into your computer with a micro USB cable and click on the “MicroPython (Raspberry Pi Pico). COMxx” interpreter in the bottom right corner.
  2. Open Script. For example, grayscale_2_get_value.py . ...
  3. Run the Script. ...
  4. Stop Running. ...
  5. Save or Save as.

What IDE is used for Raspberry Pi Pico? ›

A Pi Pico can definitely be programmed from the arduino IDE (it can also be C/C++ programmed using a C toolchain involving make which is quite laborious to install (on Linux anyway) and which Rasp Pi explains in various tutorial pdfs).

Can Raspberry Pi Pico be used as a computer? ›

A Raspberry Pi Pico has GPIO pins, much like a Raspberry Pi computer, which means it can be used to control and receive input from a variety of electronic devices. The new Introduction to Raspberry Pi Pico path uses the picozero package to engage in some creative physical computing projects.

How to program Raspberry Pi Pico VS Code? ›

vsix file for the extension, these instructions might work for you.
  1. Install npm (see here for Windows instructions)
  2. Install yarn npm install --global yarn.
  3. Install vsce npm install --global @vscode/vsce.
  4. Run yarn from the project directory.
  5. Run vsce package from the project directory.

Can Raspberry Pi Pico run an OS? ›

No - the Raspberry Pi Pico doesn't run a full desktop operating system like the Raspberry Pi 4, it runs code directly without a desktop interface (similar to how an Arduino board works). To learn more, check out the Raspberry Pi Pico Getting Started page.

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Twana Towne Ret

Last Updated:

Views: 5713

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Twana Towne Ret

Birthday: 1994-03-19

Address: Apt. 990 97439 Corwin Motorway, Port Eliseoburgh, NM 99144-2618

Phone: +5958753152963

Job: National Specialist

Hobby: Kayaking, Photography, Skydiving, Embroidery, Leather crafting, Orienteering, Cooking

Introduction: My name is Twana Towne Ret, I am a famous, talented, joyous, perfect, powerful, inquisitive, lovely person who loves writing and wants to share my knowledge and understanding with you.