Labs / Arduino + ESP32 with Wokwi

02 Developing ESP32 Based on Arduino Framework: Starting with Wokwi Simulation

Author: Li Zisheng · Source: FreakStudio open documentation · License: CC BY 4.0

In the previous episode, we reviewed the development history of open-source electronics together, covering everything from the birth of Arduino to the arrival of the ESP32, and also mentioned a user-friendly simulation website —— Wokwi.

Arduino lowers the threshold for programming and controlling hardware, the ESP32 provides a microcontroller platform with higher performance and richer peripherals, while Wokwi has built an online learning platform for beginners that requires no hardware at all, is quick to get started with, and allows for free trial and error.

So, how exactly do you develop for the ESP32? How do Arduino and ESP32 work together? And how do you operate the Wokwi page? In this episode, we will answer all these questions one by one.

1. Development Methods of ESP32

ESP32 offers multiple development approaches, each suitable for different development requirements and scenarios. The following are several common development methods, includ ing MicroPython, Arduino (covering Arduino IDE and VSCode + PlatformIO), as well as the official ESP-IDF.

1.1 MicroPython Development Approach

MicroPython is a lightweight Python implementation designed for embedded systems, which is especially suitable for beginners who want to quickly experience controlling hardware.

Suitable for people : beginners who have a foundation in Python and want to quickly get started with hardware programming.

Development Tools: Thonny IDE is commonly used; it features a clean interface and is as easy to get started with as writing Python scripts.

Features and Highlights:

02 Developing ESP32 Based on Arduino Framework: Starting with Wokwi Simulation

1.2 Arduino Development Approaches

Arduino is an open-source electronics platform that is widely used in the development of various electronic projects. It provides a rich set of libraries and sample code to help developers get started easily.

Suitable Audience: Beginners and developers who need rapid prototype development.

When developing with the Arduino framework, the following tools are available:

Features: With the Arduino library and sample code, developers can get started quickly.

02 Developing ESP32 Based on Arduino Framework: Starting with Wokwi Simulation
02 Developing ESP32 Based on Arduino Framework: Starting with Wokwi Simulation
02 Developing ESP32 Based on Arduino Framework: Starting with Wokwi Simulation
02 Developing ESP32 Based on Arduino Framework: Starting with Wokwi Simulation

1.3 ESP-IDF Development Approaches

ESP-IDF is the official Internet of Things development framework provided by Espressif Systems. Based on C/C++, it offers a complete SDK for ESP32 chips, serving as the most fundamental and native approach for ESP32 development. With this framework, you can directly control the hardware of ESP32, manage multi-threading, implement low-level operations, etc. , which is usually suitable for more complex projects that require precise control over hardware functions.

02 Developing ESP32 Based on Arduino Framework: Starting with Wokwi Simulation

2. Introduction to the Wowki Page

02 Developing ESP32 Based on Arduino Framework: Starting with Wokwi Simulation

The left side is the code editing area, where you write programs; the right side is the simulation area, where you can add components (such as LEDs, buttons, sensors, etc.) and connect them with virtual wires; the lower right corner is the analog serial port debugging window, where we can perform serial communication with the ESP32.