RobotCore 1.0
WPILib port to raspberry Pi
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

Definition at line 36 of file DigitalCounter.java.

Constructor & Destructor Documentation

◆ DigitalCounter()

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

Definition at line 49 of file DigitalCounter.java.

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.

Definition at line 116 of file DigitalCounter.java.

◆ get()

int robotCore.DigitalCounter.get ( )

Gets the current number of transitions on the pin.

Returns
Returns the current count.

Definition at line 97 of file DigitalCounter.java.

◆ reset()

void robotCore.DigitalCounter.reset ( )

Resets the counter to zero

Definition at line 105 of file DigitalCounter.java.


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