CALPOLY MECHATRONICS
Documentation for all Mechatronics Labs
encoderDriver.py File Reference

A class to read values from a quadrature encoder. More...

Classes

class  encoderDriver.Encoder
 The Encoder class reads ticks from a quadrature encoder and converts them to the shaft position in rotations. More...
 

Variables

 encoderDriver.encAPin1 = pyb.Pin(pyb.Pin.cpu.B6)
 
 encoderDriver.encAPin2 = pyb.Pin(pyb.Pin.cpu.B7)
 
 encoderDriver.tim4 = pyb.Timer(4, period = 65535, prescaler = 0)
 
 encoderDriver.pin_T3_CH1 = pyb.Pin(pyb.Pin.cpu.C6)
 
 encoderDriver.in_T3_CH2 = pyb.Pin(pyb.Pin.cpu.C7)
 
 encoderDriver.tim3 = pyb.Timer(3, period = 65535, prescaler = 0)
 
 encoderDriver.encA = Encoder(encAPin1, encAPin2, tim4)
 

Detailed Description

A class to read values from a quadrature encoder.

The encoderDriver.Encoder class is used by the controller task, controller.Controller to get closed loop feedback of the motor's position and velocity. Link to source code: https://bitbucket.org/ebriefer/me305_lab/src/master/Final%20Project/encoderDriver.py

Author
Eliot Briefer