Pwm Block
The PWM block is used to send PWM (Pulse-width Modulation) signals to a specified address. Frequency is in Hz and duty cycle is a number from 0 to 100 that represents the percentage of time the signal is high (0 = always low, 100 = always high).
Parameters
Raspberry Pi
- PWM Number (default = 0): The PWM pin to control.
- If 0 or 1 is specified, the block will attempt to control one of the hardware PWM pins (PWM0 = GPIO 12; PWM1 = GPIO 13). Any other pin number will attempt to control the given GPIO pin using software PWM. For use-cases that require high frequency and/or high accuracy PWM signals, a hardware implementation is preferred.
STM32
- Timer: The timer peripheral to use for hardware PWM generation.
- PWM Pin CH1: The pin to use for the PWM output signal. Only the first channel for the PWM is currently supported.