RobotForge

Courses From Blink to Bot — ESP32-S3 robotics with the Fre…

Lesson 5 · ~28 min · 🔒 Subscriber

PWM and the duty cycle that powers everything

How one wire driven at the right rhythm becomes brightness, motor speed, and servo angle — plus the right way to use ledcWrite on ESP32-S3.


Pulse Width Modulation is the most powerful idea in this entire course. Once you understand it, half of "robotics" stops being mysterious. A single digital pin, switched on and off at the right rate, can dim an LED, set the speed of a motor, position a servo, or play a musical note. PWM is the same idea applied four different ways. The intuition A GPIO pin can only be HIGH (3.3 V) or LOW (0 V). There is no "halfway." So how do we dim an LED, which clearly responds to partial brightness? Trick: blink it fast. Faster than your eye can follow. If we blink a pin at 1 kHz — on for 0.5 ms, off for…

🔒 Subscriber lesson

Unlock this lesson + the entire course

The Subscriber plan is $49/month and includes every paid course on RobotForge — present and future. Cancel anytime from your billing portal.

Already subscribed? Sign in above.

Want a taste first? Try the free preview lessons in this course.