Main Content
PWM
Generate pulse width modulated signal on analog output pin of Arduino AVR core
Since R2024a
Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.
Libraries:
Simulink Support Package for Arduino Hardware /
Advanced /
AVR
Description
Use the PWM block to generate square pulses of varying duty cycle on the Arduino® AVR hardware pin.
Note
The PWM block supports C/C++ code generation. This feature allows you to generate C and C++ code using Embedded Coder®.
Supported Arduino Boards
Arduino Uno
Arduino Mega 2560
Arduino Mega ADK
Arduino Leonardo
Arduino Micro
Ports
Input
Parameters
Version History
Introduced in R2024a