Robot Core Documentation
Loading...
Searching...
No Matches
robotCore.DigitalCounter Class Reference

The DigitalCounter class provides a way to count the number of transitions for a specific pin. More...

Public Member Functions

 DigitalCounter (int pin)
 
int get ()
 
void reset ()
 
DigitalCounter copy ()
 

Detailed Description

The DigitalCounter class provides a way to count the number of transitions for a specific pin.

Author
John Gaby

Constructor & Destructor Documentation

◆ DigitalCounter()

robotCore.DigitalCounter.DigitalCounter ( int pin)
Parameters
pin- Specifies the pin to read

Member Function Documentation

◆ copy()

DigitalCounter robotCore.DigitalCounter.copy ( )

Creates a copy of the specified counter. This counter will reference the same pin, but will nave an independent zero point.

Returns
Returns a copy of the counter.

◆ get()

int robotCore.DigitalCounter.get ( )

Gets the current number of transitions on the pin.

Returns
Returns the current count.

◆ reset()

void robotCore.DigitalCounter.reset ( )

Resets the counter to zero


The documentation for this class was generated from the following file: