README.md
1# Example: ESPTimer C++ class
2
3(See the README.md file in the upper level 'examples' directory for more information about examples.)
4
5This example demonstrates usage of the ESPTimer c++ class in ESP-IDF.
6
7In this example, the `sdkconfig.defaults` file sets the `CONFIG_COMPILER_CXX_EXCEPTIONS` option.
8This enables both compile time support (`-fexceptions` compiler flag) and run-time support for C++ exception handling.
9This is necessary for the C++ APIs.
10
11## How to use example
12
13### Hardware Required
14
15Any ESP32 family development board.
16
17### Configure the project
18
19```
20idf.py menuconfig
21```
22
23### Build and Flash
24
25```
26idf.py -p PORT flash monitor
27```
28
29(Replace PORT with the name of the serial port.)
30
31(To exit the serial monitor, type ``Ctrl-]``.)
32
33See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
34
35## Example Output
36
37```
38Setting up timer to trigger in 500ms
39timeout
40Setting up timer to periodically every 200ms
41periodic timeout
42periodic timeout
43periodic timeout
44periodic timeout
45periodic timeout
46
47```
48
49