n3mawashi / esp-led-button

Example of esp button change a neopixel led in esp-idf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supported Targets ESP32 ESP32-C2 ESP32-C3 ESP32-C6 ESP32-H2 ESP32-P4 ESP32-S2 ESP32-S3 Linux

Button and SK6812 LED Example

Starts a FreeRTOS task to change colour of the led when the button is pressed.. I pulled this together from the various examples and some ChatGPT effort to since I'm not a developer and this is my first try at C and the esp idf.. Will add brightness on long press sometime in the future. This is really a stepoing stone to a BLE mesh project

How to use example

Follow detailed instructions provided specifically for this example.

Select the instructions depending on Espressif chip installed on your development board:

Example folder contents

ESP-IDF projects are built using CMake. The project build configuration is contained in CMakeLists.txt files that provide set of directives and instructions describing the project's source files and targets (executable, library, or both).

Below is short explanation of remaining files in the project folder.

├── CMakeLists.txt
├── pytest_hello_world.py      Python script used for automated testing
├── main
│   ├── CMakeLists.txt
│   └── main.c
└── README.md                  This is the file you are currently reading

For more information on structure and contents of ESP-IDF projects, please refer to Section Build System of the ESP-IDF Programming Guide.

Troubleshooting

  • Program upload failure

    • Hardware connection is not correct: run idf.py -p PORT monitor, and reboot your board to see if there are any output logs.
    • The baud rate for downloading is too high: lower your baud rate in the menuconfig menu, and try again.

About

Example of esp button change a neopixel led in esp-idf

License:MIT License


Languages

Language:C 68.8%Language:Python 25.8%Language:CMake 5.4%