GearTooth

class wpilib.GearTooth(channel, directionSensitive=False)[source]

Bases: wpilib.Counter

Interface to the gear tooth sensor supplied by FIRST

Currently there is no reverse sensing on the gear tooth sensor, but in future versions we might implement the necessary timing in the FPGA to sense direction.

Construct a GearTooth sensor.

Parameters:
  • channel (int) – The DIO channel index or DigitalSource that the sensor is connected to.
  • directionSensitive (bool) – True to enable the pulse length decoding in hardware to specify count direction. Defaults to False.
enableDirectionSensing(directionSensitive)[source]
kGearToothThreshold = 5.5e-05