Introduction: Web 🌐Based Arduino Simulator From Wokwi-2020💛
Wokwi Arduino Simulator runs on AVR8js platform. It is a web based Arduino Simulator. Arduino Simulator runs on web browser. hence, this is earning more attention and honestly, this has many positive points compared to other simulators available out there.
The best part is that it is updated all the time where as many of the other simulators have stopped giving update, unfortunately.
Step 1: Simulating FastLEDs Using Arduino Simulator in a Browser
The FastLEDs are individually addressable LEDs that can be controlled using Arduino. To simulate the FastLEDs on Arduino, we will use any browser.
- Open any web browser
- Go to the FastLED simulation library link
- Choose one of the built-in examples
- For this example, we choose the DemoReel project.
- Once you open the link, you will see the simulation window shown in the image
- Click on the START button to run the project
- Once the sketch compiles and starts running on the Arduino Simulator page, it will display the time.
- The time corresponds to the execution time of the code and will be slower than the real-time.
- The performance meter in the top left page of the wokwi Arduino simulator indicated how much is the efficiency of the simulator compared to real-time execution.
- Feel free to STOP the code execution, edit the code, change the number of LEDs, the color type, or other features.
- Since the Arduino simulator runs on the web browser directly the result can be observed on the same page.
- The modified code can also be shared with others using the share option!
Step 2: How to Run Servo Motor Simulation on Wokwi Arduino Simulator
Servo motor is the basic element in robotics as well as automation and there are quite a number of projects available on GitHub. To simulate the Servo motor on the wokwi Arduino Simulator page, follow the below instructions
- Go to Servo motor library page
- Select any of the available examples
- Let us choose the sweep example for Arduino simulation
- The wokwi Arduino Simulation will open and will look similar to the image shown
- Click on the start button in the simulation window
- The Servo motor will start running in the simulation
- Tinker with the code on the left to change the speed of rotation or change the limits on the angle the motor can rotate
- New features are being added every week
- Feel free to share the code of use it in your projects as well :)
Step 3: How to Simulate the Arduino SSD1306 on Wokwi Arduino Simulator
SSD1306 OLEDs are a very attractive and easy way of bringing HMI features into the system. Arduino Simulator from Wokwi supports OLED displays as well. here are a few steps on how to visualize your sketch on the Arduino Simulator.
- Visit Wokwi Arduino Simulator page
- Choose any of the examples
- Let us see one of the examples from the Adafruit library
- The simulation window will open and looks as shown in the image (Wokwi Arduino simluator gets updates frequently, hence there is a chance that the look and feel might be different)
- You can comment on any of the functions in the sketch and hit the start button again. The simulation will then run for he modified sketch almost instatntly
- If you have your own sketch, you can also run and tinker with it
- There are also built in examples in the libraries for SSD1306 displays which you can play with
Step 4: A Collection of Simulated Elements From Wokwi Arduino Simulator
Step 5: Feedback for Improvement
Arduino community feedback from multiple sources has helped a lot to make the tool more user friendly.
I appreciate if you can take a minute to share your experience and feedback to make this tool better 😀
Other links you might be interested in 😀