Main Content
PWM
Generate pulse width modulated signal on analog output pin of Arduino SAMD21 core
Since R2023b
Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.
Libraries:
Simulink Support Package for Arduino Hardware /
Advanced /
SAMD
Description
Use the PWM block to generate square pulses of varying duty cycle on the Arduino® SAMD 21 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 MKR 1000
Arduino MKR ZERO
Arduino MKR Wi-Fi® 1010
Arduino Nano 33 IoT
Ports
Input
Parameters
Version History
Introduced in R2023b