/platform-io-esp32-counter-ci

ESP32 Pushbutton Counter (Platform IO) with Wokwi CI

Primary LanguageC++MIT LicenseMIT

ESP32 Pushbutton Counter

Counts the number of times a pushbutton is pressed, and displays the count in the serial monitor.

Includes an automated test scenario that simulates the button presses and verifies the counter value.

Use Wokwi to simulate this project, and the Wokwi CLI to run the automated test.

Building

This is a PlatformIO project. To build it, install PlatformIO, and then run the following command:

pio run

Simulate the project

To simulate this project, install Wokwi for VS Code. Open the project directory in Visual Studio Code, press F1 and select "Wokwi: Start Simulator".

Run in wokwi-cli

To run the automated test scenario, download the Wokwi CLI. Create a Wokwi CLI token and set it in the WOKWI_CLI_TOKEN environment variable. Then run the following command:

Linux/Mac:

export WOKWI_CLI_TOKEN="your token goes here"
wokwi-cli --scenario button.test.yaml .

Windows:

$env:WOKWI_CLI_TOKEN="your token goes here"
wokwi-cli --scenario button.test.yaml .