metered_motors – adds encoder feedback to the original
A wrapper class for the existing Motor class that adds support for making use of the two optical encoders too. Notice that it mimics the API of the
Motorsclass, and then extends it.
Enabling the motors allows them to move, disabling them stops them from spinning.
Parameters: do_enable (bool) – true to enable, false to disable
Get the current tick counts as a (left, right) tuple, and restart the counters.
Get the current tick counts as a (left, right) tuple.
Does not reset the tick counters.
Interrupt handler for the left encoder wheel. You don’t call this.
Interrupt handler for the right encoder wheel. You don’t call this.
Run the specified motor at the specified power.
Power levels are negative for reverse (clockwise) motion. Power levels are positive for forward (counter-clockwise) motion. A power level of 0 means stop.