|
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 implements a L6206 H-Bridge Motor Controller Shield. More...
Public Member Functions | |
| __init__ (self, en_pin, in1pin, in2pin, timer) | |
| Creates a motor driver by initializing GPIO pins and turning off the motor for safety. | |
| set_duty_cycle (self, level) | |
| This method sets the duty cycle to be sent to the motor to the given level. | |
Public Attributes | |
| pinEN | |
| chIN1A | |
| chIN2A | |
This class implements a L6206 H-Bridge Motor Controller Shield.
| src.motor_driver.MotorDriver.__init__ | ( | self, | |
| en_pin, | |||
| in1pin, | |||
| in2pin, | |||
| timer ) |
Creates a motor driver by initializing GPIO pins and turning off the motor for safety.
| en_pin | Pin that enables the motor. |
| in1pin | First pin used for input to Motor's H-bridge. |
| in2pin | Second pin used for input to Motor's H-bridge. |
| timer | Timer channel used to drive PWM. |
| src.motor_driver.MotorDriver.set_duty_cycle | ( | self, | |
| level ) |
This method sets the duty cycle to be sent to the motor to the given level.
Positive values cause torque in one direction, negative values in the opposite direction. Input levels less than -100 or greater than 100 automatically saturate
| level | A signed integer for the percent duty cycle sent to the motor. Ideally between -100 and 100. |