COUNT
 
Syntax


int COUNT(int pin, int duration);

 

Description

Count the number of pulses low-high-low or high-low-high on pin over a duration of milliseconds, returning the value to variable.

Example

    printStr("\n count pulses on pin 0 for 5 seconds\n");
    
    printDec (COUNT(0, 5000));
    printStr(" pulses happened\n");

See also