esp-idf/examples/cxx/experimental/esp_event_cxx
2023-01-17 10:29:04 +08:00
..
main Build & config: Remove leftover files from the unsupported "make" build system 2021-11-11 15:32:36 +01:00
CMakeLists.txt tools: Increase the minimal supported CMake version to 3.16 2022-06-01 06:35:02 +00:00
README.md esp32h2: add build test 2023-01-17 10:29:04 +08:00
sdkconfig.defaults C++: ESP Event wrapper classes 2020-10-22 09:56:52 +08:00

Supported Targets ESP32 ESP32-C2 ESP32-C3 ESP32-C6 ESP32-H2 ESP32-S2 ESP32-S3

ESP Event synchronous example

(See the README.md file in the upper level 'examples' directory for more information about examples.)

How to use example

Configure the project

idf.py menuconfig
  • Set serial port under Serial Flasher Options.

Build and Flash

Build the project and flash it to the board, then run monitor tool to view serial output:

idf.py -p PORT flash monitor

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.

Example Output

I (409) ESP Event C++: started event loop
event base test, ID: 0; called first round
event base test, ID: 1; called first round
received timeout
event base test, ID: 0; called second round
event base test, ID: 1; called second round
event base test, ID: 0; called second round
event base test, ID: 1; called second round
event base test, ID: 0; called second round
event base test, ID: 1; called second round
event base test, ID: 0; called second round
event base test, ID: 1; called second round
I (10419) ESP Event C++: Missed: 0 events