https://github.com/jandelgado/jled-esp-idf-platformio-example
JLed example project using ESP32 ESP-IDF SDK and PlatformIO
https://github.com/jandelgado/jled-esp-idf-platformio-example
embedded esp-idf esp32 jled
Last synced: 27 days ago
JSON representation
JLed example project using ESP32 ESP-IDF SDK and PlatformIO
- Host: GitHub
- URL: https://github.com/jandelgado/jled-esp-idf-platformio-example
- Owner: jandelgado
- License: mit
- Created: 2022-01-27T20:17:05.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-15T08:47:16.000Z (over 4 years ago)
- Last Synced: 2025-01-18T01:07:42.285Z (over 1 year ago)
- Topics: embedded, esp-idf, esp32, jled
- Language: CMake
- Homepage:
- Size: 488 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JLed ESP-IDF example (PlatformIO)
[](https://github.com/jandelgado/jled-esp-idf-platformio-example/actions/workflows/test.yml)
This example shows how to use the embedded [JLed](https://github.com/jandelgado/jled) library
with the ESP IDF framework and PlatformIO.

```c++
#include
extern "C" void app_main(void);
void app_main(void)
{
auto led = JLed(LED_PIN).Breathe(1500).Forever();
while(1) {
led.Update();
}
}
```
## Build
### Using PlatformIO
* Prerequisite: [PlatformIO](https://platformio.org/) installed
* Inspect the [platformio.ini](platformio.ini) file and adjust the `LED_PIN`
`#define` to your needs (GPIO where a LED is connected, e.g. `2` for the
builtin LED of the ESP-WROOM-32 board).
The following commands are used to configure, build and flash the image:
* run `pio build` to compile the example
* run `pio run -t upload` to flash the example on an ESP32
* optionally run `pio run -t menuconfig` to configure the image (see
(sdkconfig.esp32dev)[sdkconfig.esp32dev])
* run `pio run -t clean` to clean up intermediary files
## References
* https://docs.platformio.org/en/latest/frameworks/espidf.html
## Author and License
(C) Copyright 2022 by Jan Delgado, License: MIT