Robot controller code in C++ for a two wheel robot driven by a Arduino Mega 2560.
The robot this code is designed to control is built with the following parts (some links are affiliate links):
Name | Link | Notes |
---|---|---|
YIKESHU 2WD Chassis Kit | Amazon | |
ELEGOO MEGA R3 Board | Amazon | Any Arduino Mega 2560 variant will do |
MEGA Sensor Shield V1 | Amazon | Not strictly necessary, but it does make wiring much easier |
L298N Motor Drive Controller Board Module Dual | Amazon | There are many makers of this fairly standard board |
Infrared Slotted Optical Optocoupler Module | Amazon | Many variations on optocoupler models. This form factor works best with chassis. |
Multicolored Dupont Wires | Amazon | You will use the female to female wires mostly in this build. |
Right angled DC power connector | Amazon | Will be used to connect the Mega 2560 to power. |
6 AA Battery Holder | Amazon | The chassis kit comes with a 4 AA battery holder, but th robot works better with a 9V power supply |
Big Button Module | Amazon | Adding a button or two to the robot will allow interactions with the control software. |
microSD Module | Pololu | Used to collect telemetry while the robot is running autnomously |
MPU6050 Gyro/Accelerometer | Amazon | Used to determine the turn rate of the robot. |
Furthermore, You might find the following useful:
Name | Link | Notes |
---|---|---|
Machine Screws, Bolts, Washers, and Nuts Kit | Amazon | You will need some hardware to connect parts to the chassis. |
Brass Spacer Standoff Kit | Amazon | Using standoffs to connect various items to the chassis makes construction easier. |
Ball Caster | Pololu | The tail caster that comes with the chassis kit creates turning error. A ball caster works better |
Hook Up Wire | Amazon | You will need some wire to connect the various components together. |
Finally, some soldering is required, so material and equipment required for soldering is needed.