• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

main/11-Mar-2024-4325

CMakeLists.txtD11-Mar-2024466 118

README.mdD11-Mar-20241.4 KiB5838

sdkconfig.defaultsD11-Mar-2024157 43

README.md

1# Example: Blink C++ example
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 `GPIO_Output` 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
17Connect an LED to the corresponding pin (default is pin 4). If the board has a normal LED already, you can use the pin number to which that one is connected.
18
19Development boards with an RGB LED that only has one data line like the ESP32-C3-DevKitC-02 and ESP32-C3-DevKitM-1 will not work. In this case, please connect an external normal LED to the chosen pin.
20
21### Configure the project
22
23```
24idf.py menuconfig
25```
26
27### Build and Flash
28
29```
30idf.py -p PORT flash monitor
31```
32
33(Replace PORT with the name of the serial port.)
34
35(To exit the serial monitor, type ``Ctrl-]``.)
36
37See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
38
39## Example Output
40
41```
42...
43I (339) cpu_start: Starting scheduler.
44I (343) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
45LED ON
46LED OFF
47LED ON
48LED OFF
49LED ON
50LED OFF
51LED ON
52LED OFF
53LED ON
54LED OFF
55
56```
57
58