Reference for Wiring version 0027+. 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

pulseRunning()

Examples
void setup() {
  Serial.begin(9600);
  // generates 1000 pulses at 10Hz on PWM output pin 29
  pulseOut(29, 10, 1000);  
}

void loop() {
  // if the 1000 pulses were generated print done!
  if(pulseRunning(29) == 0) {  
    Serial.print("done!");
  }
}
Description The pulseRunning() method returns the number of remaining pulses to be generated on a pin.
Syntax
pulseRunning(pin)
Parameters
pin int: the PWM output pin number in which the pulses are being generated
Returns int: the number of pulses remaining to be generated
Usage Application
Related pulseOut()
pulseStop()
Updated on September 17, 2010 01:59:55pm PDT

Creative Commons License