pulseRunning() \ Language (API) \ Wiring ALPHA 1.0
Author: Hernando Barragán
Description: Wiring is an electronic sketchbook and hardware electronics for developing ideas. It is a context for learning fundamentals of computer programming and prototyping with electronics within the context of the electronic arts.
Keywords: Wiring, Processing, Interactive Media, Electronic Arts, Programming, C, C++, Hernando Barragán

Search wiring.org.co:

Reference for Wiring version 0023+. 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);
      pulseOut(3, 10, 1000);  // generates 1000 pulses of 10Hz on PWM output pin 3
    }

    void loop() {
      if(pulseRunning(3) == 0) {  // if the 1000 pulses were generated print done!
        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 November 01, 2009 11:34:39pm PST