Team2168 / 2015_Main_Robot

Source code for the 2015 season
2 stars 0 forks source link

Encoders #17

Closed jcorcoran closed 9 years ago

jcorcoran commented 9 years ago

Any encoder with a get distance method being used (drivetrain, lift), MUST have first called the setDistancePerPulse() method. This method defines the conversion from ticks (wha tthe encoder reports to the robot) to a distance in whatever units you provide. Preferably inches.

See: http://team2168.org/javadoc/edu/wpi/first/wpilibj/Encoder.html#setDistancePerPulse-double-

To figure out the distance associated with a single tick, you will need to understand how the subsystem works, the gearing in the gearbox, and how many ticks the encoder sees in each time it travels a complete revolution.

Ask a mentor for help!