I would like to buy the chassis / motor for your twin Tamiya motor tank robot. This is my 1st robot project. I have an arduino uno, and a Pololu Dual VNH5019 Motor Driver Shield for Arduino which I bought for another project. I would like to use a single joystick to drive the tank. I attempted to write a program e.g.
: Joystick straight up. Both motors run at 255.
Joystick straight down. Both motors run at -255.
Joystick Right. Left motor runs at 255, right motor at -255.
Joystick Left. Left motor runs at -255. Right motor at 255.
And everywhere in between…
without success until I found a program on the internet here.
this program requires a motor controller with 4 pwm inputs. 2 for the left motor, and 2 for the right. Here is a snipit of the code:
const byte controllerFA = 10; //PWM FORWARD PIN for OSMC Controller A (left motor) const byte controllerRA = 9; //PWM REVERSE PIN for OSMC Controller A (left motor) const byte controllerFB = 6; //PWM FORWARD PIN for OSMC Controller B (right motor) const byte controllerRB = 5; //PWM REVERSE PIN for OSMC Controller B (right motor) const byte disablePin = 2; //OSMC disable, pull LOW to enable motor controller
Does Pololu have a motor controller I can purchase so I can use this program? The OSMC controller is way to much (expensive and 160 amps) for your tank robot. It seems like a great program and I downloaded it to my arduino and from the Serial window it seems to work great. After several hours I could not find another program, and I am new to c programming and just can’t seem to be able to write my own program yet, as it is a differential combination between x and y.
Thank you so much!