-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
With the following code below, the numbers would print 3 more times at the same value after I turned a wheel, and then print out the correct value.
from XRPLib.differential_drive import DifferentialDrive
import time
differentialDrive = DifferentialDrive.get_default_differential_drive()
while True:
print('Left ' + str(differentialDrive.get_left_encoder_position()))
print('Right ' + str(differentialDrive.get_right_encoder_position()))
if (differentialDrive.get_left_encoder_position()) > 20:
differentialDrive.reset_encoder_position()
time.sleep(1)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels