Reference for Wiring 1.0 (ALPHA) 0017+. If you have a previous version, use the reference included with your software.
If you see any errors or have any comments, let us know.
Name
pulseStop()
Examples
void setup() {
pinMode(0, INPUT); // sets digital pin 0 as input to connect a switch
pulseOut(4, 20); // generates a pulse of 20Hz on PWM output pin 4
}
void loop() {
if(digitalRead(0) == HIGH) { // if the switch is pressed stop the pulse
pulseStop(4);
}
}
Description
The pulseStop() method stops the pulse generation in the specified PWM output pin. If a number of pulses has been specified it stops the pulses even if there is remaining pulses to generate.
Syntax
pulseStop(pin)
Parameters
pin
int: the PWM output pin number to stop generating pulses