

Master PWM (Pulse Width Modulation) output control in this actuator project. You'll program the Pluto drone to smoothly vary LED brightness using PWM values and timer-based loops - a technique essential for motor control, servo driving, and precise actuator management in drone systems.
Build a program to create a smooth glowing-fading LED effect using PWM control on the Pluto flight controller board.
The LED module is a high-luminosity LED attachable to the Pluto drone. Unlike the onboard indicator LEDs, this external module can be driven with PWM signals to achieve variable brightness. PWM works by rapidly switching the signal between HIGH and LOW - the ratio of ON time to total cycle time (duty cycle) determines the perceived brightness.
Connect the GlowLite to the RC port on the Primus V5/X2 board. The LED module only requires GND and Signal connections. No VCC line is needed as the signal pin provides power through PWM.
| Primus V5/X2 Pin | Peripheral |
|---|---|
| GND on RC port |
Open this code in PlutoBlocks to program your drone. The visual blocks below show the complete solution.

PlutoBlocks visual code for GlowLite project
PlutoIDE C++ code for this module is coming soon. Stay tuned for updates!
Ready for the next challenge? Try these extensions to deepen your understanding.
| GND on LED_module |
| Signal on RC port | VCC on LED_module |
Approach We use a timer with a 500ms period and the PWM functionality of the Primus X2/V5 board. A while loop increments the PWM value sent to the LED, creating a smooth glow-up effect. Code Logic Explained On Start: A variable PWM_value is initialized to 500, and a repeating timer (Timer1) is set with a 500ms interval. This timer controls the pace of brightness changes.Pluto Loop: A while loop runs as long as PWM_value is less than or equal to 2000. On each timer tick, the PWM pin (PWM_1) is set to the current PWM_value, then PWM_value is incremented by 100. This creates a staircase ramp from dim (500) to bright (2000) over approximately 8 seconds. Red + Green LEDs glow yellow as a heartbeat indicator.On Stop: Timer1 is reset to clean up resources.
Search and rescue operations in dark areas Night-time drone visibility signaling Drone light shows and visual effects
Ready for the next challenge? Try these extensions to deepen your understanding. 1Use PWM instead of GPIO to create a smooth brightness fading effect. 2Experiment with different LED types (RGB, high-power) for varied effects. 3Build a search-and-rescue drone with a powerful LED for exploring dark areas. Pluto Drone Add-On Projects — Compatible with Pluto 1.2 (Primus V5) & Pluto X (Primus X2) — Drona Aviation