Lucas Murray ME 305 Portfolio
Classes | Variables
encoder.py File Reference

A driver for reading from Quadrature Encoders. More...

Classes

class  encoder.Encoder
 Interface with quadrature encoders. More...
 

Variables

 encoder.B6 = pyb.Pin(pyb.Pin.cpu.B6)
 
 encoder.B7 = pyb.Pin(pyb.Pin.cpu.B7)
 
 encoder.myEncoder = Encoder(B6, B7, 4)
 
 encoder.start_time = time.ticks_ms()
 
int encoder.updatePosition = 0
 
 encoder.current_time = time.ticks_ms()
 
int encoder.elapsedTime = time.ticks_diff(current_time, start_time) / 10
 

Detailed Description

A driver for reading from Quadrature Encoders.

The Encoder class initiates an object that can read the position of a quadrature encoder. It allows the user to update and print the position and the change in position from the previous update at the desired time intervals as well as zero the encoder.
Source Code: https://bitbucket.org/lmurray03/me305_lucas_murray/src/master/Lab%200x02/encoder.py

Author
Lucas Murray
Max Cassady
Date
February 3, 2022