Flipper Zero SimulatorDismantle, inspect and operate the device.
Interactive lab
Loading the Blender model…
0/50
Dim an LED or generate a tone with a hardware timer.
Module: GPIO and buses
PWM varies the duty cycle of a fixed-frequency square wave.
Solder an LED and a 330 ohm resistor on the prototyping module to see PWM brightness change.
furi_hal_pwm_start(FuriHalPwmOutputIdTim1PA7, 1000, 25); // 1 kHz, 25 %
What does duty cycle describe?
← 15. Digital input and output · All lessons · 17. Analog input (ADC) →
Try it yourself
l16_pwm_output.c
furi_hal_pwm_start(FuriHalPwmOutputIdTim1PA7, 1000, 25); // 1 kHz, 25 %