Skip to content

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

Notifications You must be signed in to change notification settings

rahtol/LED-Dimmen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages