โ Arduino learning pathArduino ยท Module 5 of 10
PWM and actuators
Control brightness, motors and servos.
๐ Key ideas
- analogWrite(pin, 0โ255) outputs PWM on ~ pins (3, 5, 6, 9, 10, 11).
- PWM dims LEDs and controls motor speed.
- Servo library: myServo.write(90) sets angle.
- DC motors need a motor driver (L298N/L293D).
- Buzzers play tones with tone(pin, frequency).
๐ก Real-life example: PWM is blinking a light so fast your eyes see it as dimmer or brighter.
PWMPulse Width Modulation
analogWriteOutputs PWM value 0โ255
ServoMotor with angle control
Motor driverSupplies current to motors