1.1 ESP32 PWM

less than 1 minute read

ESP32 PWM


Tutorials_Site

freq -> how many times per second
freq 10 -> you can see flicker on your led.
resolution -> pwm size
resulution 8 => 2^8 = 256 => 0~255

Setup

ledcSetup(ledChannel, freq, resolution);


AttachPin

ledcAttachPin(GPIO, channel);


Write

ledcWrite(channel, dutycycle);


Go to top

Leave a comment