Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rahtol/led-dimmen

A simple ESP32 project using the LEDC library to dim a LED.
https://github.com/rahtol/led-dimmen

esp32 esp32-arduino ledc platformio vscode

Last synced: 2 months ago
JSON representation

A simple ESP32 project using the LEDC library to dim a LED.

Awesome Lists containing this project

README

        

# A simple ESP32 project using the LEDC library to dim a LED

An ADC input - preferrably connected to a potentiometer - is used to control the brightness and behavior of an LED.
Two special cases: (1) an ADC reading below 128 results in automatic fading every ca. 12.8s
(2) an ADC reading above 4096-128 lets the LED flash with 5Hz.
Values in beween directly control the PWM duty cycle and thus LED brightness.

LEDC library uses PWM to realize dimming and is part of ESP32 Arduino framework.
See "github.com/espressif/arduino-esp32" and "espressif-docs.readthedocs-hosted.com/projects/ardguino-esp32" version 2.0.14

Target: ESP32 from AZ-Delivery.
Setup: Vscode + Platformio
Board: "WEMOS D1 MINI ESP32"
Framework: "Arduino"

GPIO0: ADC input, i.e. poti
GPIO1: LED output via 220ohm resistor