jandelgado / jled-esp-idf-platformio-example

JLed example project using ESP32 ESP-IDF SDK and PlatformIO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JLed ESP-IDF example (PlatformIO)

test compile

This example shows how to use the embedded JLed library with the ESP IDF framework and PlatformIO.

JLed in action

#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();
    }
}

Build

Using PlatformIO

  • 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

References

Author and License

(C) Copyright 2022 by Jan Delgado, License: MIT

About

JLed example project using ESP32 ESP-IDF SDK and PlatformIO

License:MIT License


Languages

Language:CMake 51.5%Language:C++ 48.5%