Matthew's Portfolio
encoderTask.py File Reference

Interface with the encoder driver to find angle and angular speed. More...

Classes

class  encoderTask.encoderTask
 Task to call the encoder driver for current angles and velocities. More...
 

Variables

 encoderTask.encY = encoderDriver(False, pin1 = pyb.Pin.cpu.C6, pin2 = pyb.Pin.cpu.C7, encTimer = 8)
 An instance of the encoder driver on motor X.
 
 encoderTask.encX = encoderDriver(False, pin1 = pyb.Pin.cpu.B6, pin2 = pyb.Pin.cpu.B7, encTimer = 4)
 An instance of the encoder driver on motor Y.
 

Detailed Description

Interface with the encoder driver to find angle and angular speed.

When called by the scheduler, this task gets the newest speed and angle from the encoderDriver.py and send that to shares.py. Also, during platform levelling, the encoders can be zeroed before the controller begins. See source code here: Encoder Task Source Code

Author
Matthew Frost
Ryan McLaughlin
Date
Originally created on 05/21/21
Last modified on 06/03/21