Virtual Online Arduino and ESP32 Simulator - Wokwi Arduino Simulator features

Link: Arduino Libraries

Topic: There are already a lot of Arduino and ESP32 simulators online. Unfortunately, most of them have been last updated several years before. A few are available but not for free. Here I have tried almost all Arduino Simulators and common problems are below

  1. No support of external libraries
  2. No support for assembly programming
  3. runs on an outdated Arduino IDE
  4. Very slow

I have been working with the wokwi Arduino simulator for some time, and I would like to share my experience of why it is a valid and workable solution presently for simulation needs.

  • The basic AVR8js compiler engine which runs the simulator is made open-source (GitHub - wokwi/avr8js: Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js)
  • The execution happens on the browser itself yet without much lag (very fast, compared to older simulators)
  • Peripherals support - new ones are added frequently
  • A step towards practical things - For example - bounce feature is there for the switches
  • Quite a number of standard examples are there
  • Supports UNO, Mega, Nano, ATtiny85, ESP32 and more will be added on request, soon
  • special peripherals such as ultrasonic sensors, NeoPixels, FastLEDs (matrix, strip and others) are supported
  • support is available (Wokwi)

many people have created applications based on the open-source AVR8js engine

I would request you to share your constructive criticism. This helps a lot to make this Free Arduino simulator, a practical tool too in the future

Hello all,

I would like to introduce a free Arduino simulator and an ESP32 simulator for all those people who are looking for a

  • faster Arduino simulator

  • simulator with lots of examples

  • Arduino simulator with the support team

  • The simulator can run flawlessly on Windows, macOS, and on mobiles as well

  • Free ESP32 Simulator to learn ESP32 programming

free Arduino simulator by Wokwi
free ESP32 simulator by Wokwi

This Arduino simulator can be used by students to learn Arduino programming and ESP32 programming faster

It is very easy to share the project (just one click) with others. This enables easy code sharing as well. This also helps the teachers to create partial projects which students can take to complete.

All the interfaces are made free. There is no limitation (irritation) of limited simulation time or limited simulated parts. Hence, especially during the situation we all are in, hence Wokwi Arduino and ESP32 simulator is a very good solution for schools, universities and remote classes.

Other benefits of the free Arduino ESP32 simulator

  • Free

  • faster simulations

  • multi-file projects are supported

  • Supports UNO, Mega, Nano, ATTiny85 as well

  • Supports a lot of peripherals and sensors

  • very easy to add third-party libraries and work with them

  • The projects are stored on the server. hence, they can be accessed anywhere, anytime via any device

  • Coding can be done on any PC with a browser. Many people are coding on their mobiles and tablets too,

  • No installations or downloads are necessary!

  • ESP32 Simulator supports MicroPython as well


Example projects

ARDUINO and PUSH BUTTON projects

Simon Game - A memory game with 4 push buttons

Diatonic Piano - A 8-note piano, use keys 1-8 to press the buttons and play the notes.

Bounce vs non-bounce - a good example of showing how a bounce in mechanical switches can create multiple ON-OFF conditions due to a single user press.

ARDUINO and LED projects

Blink - Arduino's standard Blink sketch

ARDUINO and LCD1602, LCD2004 projects

LiquidCrystal Hello World

LiquidCrystal I2C Hello World

LiquidCystal Custom characters

Electronic Safe

DS1307 Clock

LCD2004 Tiny Pacman on Wokwi

ARDUINO and MEMBRANE-KEYPAD projects

Basic Keypad example

Arduino Calculator

Electronic Safe

Arduino SERVO MOTOR examples

Sweep

Knob

ATTiny85 examples

ATtiny85 Blink

ATtiny85 Simon Game

ATtiny85 FastLED Matrix

ATtiny85 Charlieplexing

ATtiny85 SSD1306 + DHT

ESP32 Arduino Simulator Examples#

ESP32 MicroPython Simulator Examples#

ESP32 Simulator ESP-IDF Examples#

The following examples use the ESP-IDF functions. They are compiled using Arduino ESP32 Core:

You can find a lot of Arduino library examples as well.


Got a suggestion? Need a hand?

People here on Discord for support
Join the Facebook group to share your projects and ask questions as well!

Please support this free Arduino simulator and ESP32 simulator platform by testing, tinkering with other projects and also by giving feedback!

Thanks a lot. Please DM or reply with comments and let us know what you think!

firefox_86Okfcjcju

2021-01-17_12h00_45.png

2021-03-02_23h16_35.png

2021-03-06_11h11_24.png

2021-03-06_11h14_08.png

2021-04-03_20h57_03.png

Comparing Tinkercad to Wokwi by Koepel
Updated at 23 August 2021

Tinkercad Wokwi
Open source No The simulation in the browser is on Github
Drag and drop circuit Yes Yes
Cheatsheet needed to build circuit No Sometimes
Simulation of analog circuit Yes No
Boards Uno, ATtiny, micro:bit Uno, Nano, Mega, ATtiny85, Raspberry Pi Pico (Arduino and CircuitPython), ESP32 in development
Use any library No Yes, any library from the Library Manager of the Arduino IDE. Other libraries can be added by adding the *.h and *.cpp files as local files
Two Arduino boards at the same time Yes No
Showing the simulation speed No Yes
Debug Simple I could not make it work
Simulated Logic Analyzer No Yes
Ledstrip Limited Both NeoPixel and FastLED support for any kind of ledstrip or led-matrix
Be able to edit the text of the circuit layout No Yes
Be able to misalign a connection Yes No
Visualy Okay Okay
Report a bug I don't know Yes, multiple ways and someone will look into it
Website Demanding website
(slow on slow computer)
Fast website, but slow file access and file update
UTF-8 Not full support in the Serial Monitor Yes
Code speed 15% slower Same as the current Arduino IDE
Simulation speed on slow computer Firefox 7% :snail:
Chrome 16% :snail:
Firefox 38% :racehorse:
Chrome 79% :racehorse:
Get a public permanent link to a project Yes, but very hard to find Yes, very easy
Code in multiple tabs No Yes
Programming in "Blocks" Yes No
Development Very little Developing all the time
Is it behaving as expected Yes Yes
Fun factor A misalignment is bad There are many fun things to explore ✓✓✓

The Simulation speed was tested with math (calculating pi) and compared with a real Arduino Uno board with Arduino IDE 2.0.0-beta.5. The simulation was done in Windows 10 with Firefox 88 and Chrome 90 and I used my slowest computer for the test.

The Code speed was tested with millis() to measure calculating pi on a slow computer. Even if the computer could not run the simulation at full speed the resulting millis() value was the same in Wokwi as the real Uno board. Tinkercad was slower, perhaps because of other compiler options.

Tinkercad can misalign connections between components or on a breadboard which can not be seen, but they do not make contact. In the Arduino forum (Problem with second shift register 74hc595) there is a link to a Tinkercad project (Circuit design Ardu midi keyboard | Tinkercad) which had most of the diodes misaligned. Such misalignments can be hard to find. Wokwi forces to use wires, which will only be successful when the connection is made.

Tinkercad has a bug. It can not always use the delete operator in a normal way. Sometimes it can be fixed with: delete[]. If a pointer to a object is used and there is a destructor defined, then there is no solution to delete the object via the pointer. Sometimes the delete operator is generated by the compiler which will fail in Tinkercad.

Tinkercad has another bug when converting a integer to a String object, see here.

Wokwi is still in development and does not simulate everything of the Arduino Uno yet.

In August 2021, Wokwi is no longer just a simulator, because it has a Logic Analyzer and can connect to a external Serial Port.
The Logic Analyzer can capture signals from the simulation which can be analyzed on the computer (outside Wokwi).
The external Serial Port uses the Serial API of the Chrome browser. It can be used to communicate to the real world, for example a real Arduino board.

Conclusion: On 3 May 2021 the drag and drop was introduced. At that moment it became useful for beginners. In July 2021 Wokwi is a very useful tool and has passed Tinkercad with flying speed.
Tinkercad has two advantages: It can simulate a analog circuit and it can simulate a circuit with multiple Arduino boards running at the same time.

5 Likes

Are you planning to integrate ESP8266 boards?
Sounds interesting :grinning:

Thank you

Yes definitely. ESP32 on priority. I will message again. Please keep an eye on https://wokwi.com/discord group for updates!

Hi all,

Here is a short post with the links to the Arduino simulator for Arduino UNO, Mega, Nano and more.

Arduino UNO

Arduino Mega

Arduino Nano

ATTiny85 MCU

Raspberry Pi Pico

MicroPython on Pi-Pico

Circuit Python on Pi Pico

Franzininho Board

Arduino Nano RP2040 Connect

ESP32

ESP32 tiny Pico Board

MicroPython on ESP32

Hi, thx, great work,
Gave it a try,

Could not find the ESP32 from the original website, had to use Google to find one, (someone's personal custom made?),

Loaded code, created libraries.txt and added libraries to the list (just the name with no .h of the allegedly unsupported libraries),
Still did not compile

Did not try further,
I AM MOST LIKELY THE ISSUE but this is my feedback

Cheers

Hi @frenchydude08 both Wokwi and the ESP32 are in development, but the ESP32 simulation supports already many things. In the post above yours, you would find a link to the ESP32.

When you are logged in at Wokwi, then you can store your project and get a link to it. You can share that link, so we can help with the libraries.
Because the ESP32 is not an official Arduino board, some specific libraries are not included in the Arduino Library Manager.

You could have started with a Arduino Uno and a few leds :wink:

1 Like

Hi Koepel,

Thanks for the follow up,

Is the ESP32 not linked on the Wokwi main page because it is still being developped ?
Why not have a link to ‘boards under developement’ ?

I think a Uno and a few leds is not much of a test, unless running a primary school workshop..

Don’t get me wrong, I think it’s a great project and work !

I thought the libraries.txt would be some automated way of trying to recover the libraries from git or the net..

By the way, once added, I could not find a way to remove the libraries tab.

PS. I joined the Discord, great link :+1:

1 Like

After using and testing other simulators, I really like Wokwi. My enthusiasm is when comparing Wokwi to other simulators. When you try to simulate a real project with a ESP32 which is still in early development, then you are asking too much.

Correct.
Even the Arduino Uno is not 100% simulated. I found a few things, and they were fixed. I made an Issue for the internal temperature sensor, and you can see how fast it was fixed.

It is indeed a great tool for schools. Have you seen the FastLED examples ? Some things are are easier in Wokwi then with real hardware.

No. I don't know if it changes in the future, but at the moment Wokwi is able to use the libraries that are also in the Library Manager of the Arduino IDE. For unknown libraries, you have to copy all the *.h and *.cpp files to your project.

Yeah, sometimes I also have trouble with a delay and update and delete files and projects myself. Once I can pinpoint the problem, I could make a Issue at Github.

1 Like

Agreed, it's looks good, friendly, and no installation is required.
There is also a great amount of ready to use samples!

I can only imagine the amount work done, and ahead!

Ideal for schools,

Keep it up! :+1: :hugs: :star_struck:

1 Like