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.
src.motor_driver.MotorDriver Class Reference

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
 

Detailed Description

This class implements a L6206 H-Bridge Motor Controller Shield.

Constructor & Destructor Documentation

◆ __init__()

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.

Parameters
en_pinPin that enables the motor.
in1pinFirst pin used for input to Motor's H-bridge.
in2pinSecond pin used for input to Motor's H-bridge.
timerTimer channel used to drive PWM.

Member Function Documentation

◆ set_duty_cycle()

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

Parameters
levelA signed integer for the percent duty cycle sent to the motor. Ideally between -100 and 100.

The documentation for this class was generated from the following file: