As I mentioned in another thread, I have also been playing around with a new Rover by Orion Robotics: orionrobotics.com/Razor-4WD_p_249.html. Electronically this rover is setup with a DaVinci board with their Nomad shield and a Roboclaw(5) and I am using one of their PS2 controllers with it.
While playing around with this one, I decided to make sure my Lynxmotion Quad still worked, so I replaced the BB2/BAP28 with a Botboarduino, Currently it has an older sabertooth 10RC motor controller. May swap in a roboclaw as 2 of the motors have encoders on them. Earlier I made a version of the Rover for the Botboarduino that I tested on my Tri-Track, that can be configured for RC mode or to use Serial Packet mode. Currently I have the code configured for RC mode as that is that is what this Sabertooth understands… Please pardon the rats-nest of wiring and the like: Still experimenting, also had problems of one of the switches shorting out, which I fixed… Also may need new batteries as the 2 used in series for 12v’s are getting pretty weak.
In case anyone is interested I uploaded my Rover code here…
Warning: I have not checked to see if my wiring of the motors and the like matches the current build instructions. That is which motors go to the M1 connections, and which go to the M2 connections and which are connected to + and which to -. But is easy to muck around to fix in the function:
CheckAndProcessPS2Data: The values computed:
// Ok lets grab the current Stick values.
LStickY = NormalizeJoystickValue((ps2x.Analog(PSS_LY)-128));
LStickX = NormalizeJoystickValue(ps2x.Analog(PSS_LX)-128);
RStickY = NormalizeJoystickValue((ps2x.Analog(PSS_RY)-128));
RStickX = NormalizeJoystickValue(ps2x.Analog(PSS_RX)-128);
Sometimes you may need to negate some of these.
Likewise you can change which motor does what in the methods:
MotorsDriver::RDrive and MotorsDriver::LDrive
Now back to the other type of quads…
Kurt
Arduino_Rover-130123a.zip (8.66 KB)