Skip to content

This is a library for the motor controller shield based on AFMotor.h library customized for the Robotics Workshop of the Computer Engineering Department of TIP-QC.

License

Notifications You must be signed in to change notification settings

roycechua/MotorControllerShieldCPE-QC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MotorControllerShieldCPE-QC

This is a library for the L293D motor controller shield based on AFMotor.h library customized for the Robotics Workshop of the Computer Engineering Department of TIP-QC.

This was made for a Robot that has 2 Brushed DC Motors, two IR Sensors, and an Ultrasonic Sensor(library will support this in a future release).

You can read here or go to the web page roycechua23.github.io/MotorControllerShieldCPE-QC/

Instructions

To use this library you must

1. Download AFMotor.h library from Adafruit wbich you can conveniently download on the Arduino IDE by clicking Sketch then Include Libaries

Going to Arduino Libaries

2. Then download the Adafruit Motor Shield V1

Downloading Adafruit Motor Shield V1

3. Clone this repository or Download as ZIP, if you cloned this repository make sure to move it to the Arduino library location (ex. C:\Users<Username>\Documents\Arduino\libraries for Windows) OR if you downloaded this repository as a ZIP file, extract it then move it to the Arduino library location.

The two libraries should be present in the Arduino library folder like the one below.

Example of installed libraries

4. MotorControllerShieldCPE-QC library's example should now be present in the Arduino IDE through File -> Examples -> MotorControllerShieldCPE-QC. You should be able to see 3 examples.

Example of MotorControllerShieldCPE-QC library

Example of the Robot Navigation codes

Remember to create an instance of Controller.

Controller bot = Controller();

For robot navigation, these are the functions available

bot.moveForward(speedmotorA, speedMotorB) // from 0-255
bot.moveBackward(speedmotorA, speedMotorB) // from 0-255
bot.moveLeft(speedmotorA, speedMotorB) // from 0-255
bot.moveRight(speedmotorA, speedMotorB) // from 0-255

To read data from the IR sensor

  bot.ReadSensorVal1() 
  bot.ReadSensorVal2()

Support or Contact

Having trouble with the library? Just send an email to royce236@gmail.com and we’ll help you sort it out.

License

This repository is under MIT License.

About

This is a library for the motor controller shield based on AFMotor.h library customized for the Robotics Workshop of the Computer Engineering Department of TIP-QC.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages