This example shows how to use the embedded JLed library with the ESP IDF framework and PlatformIO.
#include <jled.h>
extern "C" void app_main(void);
void app_main(void)
{
auto led = JLed(LED_PIN).Breathe(1500).Forever();
while(1) {
led.Update();
}
}
- Prerequisite: PlatformIO installed
- Inspect the 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
(C) Copyright 2022 by Jan Delgado, License: MIT