en-us_commands:reference:npwm
This is an old revision of the document!
Table of Contents
NPWM()
Commands
| Command | Arguments | Return Value | Operation |
|---|---|---|---|
NPWM(pin) | uint8_t pin | void | Outputs the prepared number of pulses. |
Example
void setup() { NPWM_BEGIN(0, 1000, 50.0F, 100); // Prepare pulse output with the specified frequency, duty cycle and pulse count. } void loop() { NPWM(0); // Output the configured number of pulses. }
Precautions
- Check product-specific PWM pins and timer sharing.
- Changing frequency or resolution may also affect other channels on the same timer.
- Ensure the connected load is safe when stopping or resetting outputs.
en-us_commands/reference/npwm.1788791735.txt.gz · Last modified: by 127.0.0.1
