|
ME 405 Term Project: Thermal Imaging Nerf Turret 1.0
A library that contains software used to control and fire an automated Nerf turret. The turret uses a MLX90640 Thermal Imaging camera to determine opponent's position and fire.
|
This class contains functionality to setup, read, and zero a quadrature encoder on a 16 bit timer channel on an STM-32. More...
Public Member Functions | |
| __init__ (self, ENA, ENB, timer, CHA, CHB) | |
| Creates an Encoder object that intializes the Encoder's pins and sets the set GPIO Pin Timer and respective channels. | |
| read (self) | |
| Function reads the Encoder's position as a positive/negative integer. | |
| zero (self) | |
| Function set all Encoder counts to 0. | |
Public Attributes | |
| pinENA | |
| pinENB | |
| tim | |
| ENCA | |
| ENCB | |
| lastCount | |
| totalCount | |
This class contains functionality to setup, read, and zero a quadrature encoder on a 16 bit timer channel on an STM-32.
| src.Encoder.Encoder.__init__ | ( | self, | |
| ENA, | |||
| ENB, | |||
| timer, | |||
| CHA, | |||
| CHB ) |
Creates an Encoder object that intializes the Encoder's pins and sets the set GPIO Pin Timer and respective channels.
| ENA | GPIO pin associated with Encoder Channel A. |
| ENB | GPIO pin associated with Encoder Channel B. |
| timer | Timer object used as a counter. |
| CHA | Timer Channel corresponding to Encoder Channel A. |
| CHB | Timer Channel corresponding to Encoder Channel B. |
| src.Encoder.Encoder.read | ( | self | ) |
Function reads the Encoder's position as a positive/negative integer.
Accounts for under- and over-flow cases by comparing the most recent and current count from the Encoder.