Wokwi Simulation - tildemark/ESP32-OLED-GME12864-78 GitHub Wiki

Wokwi Simulation

This page provides instructions on simulating your ESP32 and OLED display project using the Wokwi online simulator.

1. Create a Wokwi Project

2. Copy Code

  • Copy the code from the src/main.cpp file in the root of this project's repository.
  • Paste it into the Wokwi code editor.

3. Use diagram.json

  • Upload the diagram.json file from the root of this project's repository to your Wokwi project. This file describes the hardware components and connections.
  • Important: Adjust scl and sda in the diagram.json file if you are using different pins on your ESP32. If you changed the pins in your hardware setup, they need to be changed here as well.
  • Note: The diagram.json file is located in the root directory of this project's repository.

4. Example Wokwi Project

5. Add Libraries

  • Download the Adafruit SH110X and Adafruit GFX libraries from their respective GitHub repositories.
  • Create a libraries folder in the root of your Wokwi project.
  • Create subfolders inside the libraries folder with the name of the libraries, Adafruit_SH110X and Adafruit_GFX.
  • Upload the library files (.h and .cpp) into the corresponding subfolders.
  • Ensure the library structure is correct.

6. Simulate

  • Click the "Start" button in Wokwi to run the simulation.

Notes

  • Verify your diagram.json settings, especially the i2cAddress and pin connections.
  • Double-check that you've uploaded all necessary library files and that they are in the correct directory.
  • If your simulation does not work, check the serial monitor in Wokwi for error messages.
  • Wokwi may not perfectly simulate all hardware interactions.