NPWM_BEGIN() prepares pulse output with the specified frequency, duty cycle and pulse count.
void NPWM_BEGIN(uint8_t pin, uint32_t intHz, float Duty, uint32_t N)
| Command | Arguments | Return Value | Operation |
|---|---|---|---|
NPWM_BEGIN(pin, intHz, Duty, N) | uint8_t pinuint32_t intHzfloat Dutyuint32_t N | void | Prepares pulse output with the specified frequency, duty cycle and pulse count. |
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. }