Skip to content

KevinCooper/robotLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

#Description
This library is for interfacing with the robots for the ECE382 class.
##Functions
Sets up the timer subsystems of the robot to a PWM of 50%
void initRobot()

Enables the left motor and moves it in the forward direction
void turnLeftWheel()

Enables the right motor and moves it in the forward direction
void turnRightWheel()

Enables the left motor and moves it in the backward direction
void turnLeftWheelBack()

Enables the right motor and moves it in the backward direction
void turnRightWheelBack()

Stops the right motor completely
void stopRight()

Stops the left motor completely
void stopLeft()

Change the PWM signal to speedLeft/100 and speedRight/100. These values should not be set above above 60 or the motor driver chip could be damaged. This function can be used at any time. void modTimer(int speedLeft, int speedRight)

Move the robot in the forward direction with the speed settings for the left and right wheel respectively.
void moveForward(int tuneLeft, int tuneRight)

Move the robot in the backward direction with the speed settings for the left and right wheel respectively.
void moveBackward(int tuneLeft, int tuneRight)

Make a left turn greater than forty-five degrees.
void leftTurn()

Make a right turn greater than forty-five degrees.
void rightTurn()

Make a right turn that is less than forty-five degrees.
void halfRight()

Make a left turn that is less than forty-five degrees.
void halfLeft()

Stop all the motors on the device. This needs to be called between every other function call to ensure the proper pins are reset. Further investigations are being done.
void stop()

About

A library for interacting with the ECE382 robot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published