![]() |
Pen Plotter Project
|
This class implements an encoder for an ME405 kit. More...
Public Member Functions | |
| def | __init__ (self, Pinch1, Pinch2, timerNum) |
| Constructs an encoder object. More... | |
| def | update (self) |
| Updates encoder position and delta. | |
| def | read (self) |
| Returns encoder position. More... | |
| def | zero (self) |
| Sets encoder position to zero. | |
| def | get_delta (self) |
| Returns encoder delta. More... | |
Public Attributes | |
| timX | |
| Configures Nucleo timer at some parameter timerNum, and. | |
| position | |
| Configures relationship between timer and encoder B pin. More... | |
| Eposition | |
| Encoder position, which doesn't account for overflow. | |
This class implements an encoder for an ME405 kit.
| def encoder_clephan_mcgrath.Encoder.__init__ | ( | self, | |
| Pinch1, | |||
| Pinch2, | |||
| timerNum | |||
| ) |
Constructs an encoder object.
Instantiates timer, timer channels for encoder, and actual/encoderr position
| Pinch1 | is the encoder channel B |
| Pinch2 | is the encoder channel A |
| timerNum | is timer number used as found on Nucleo datasheet |
| def encoder_clephan_mcgrath.Encoder.get_delta | ( | self | ) |
Returns encoder delta.
| def encoder_clephan_mcgrath.Encoder.read | ( | self | ) |
Returns encoder position.
| encoder_clephan_mcgrath.Encoder.position |
Configures relationship between timer and encoder B pin.
Configures relationship between timer and encoder A pin
Actual position as recorded by the encoder