So far it's looking pretty good.
I couldn't help myself! Just HADS TA drive it! XD
Everything is VERY temporarily double sided taped in place.
At the back is one of my Mega rigs with Sparkfun XBee, GPS and Monster Motor shields.
On top of those is a DFRobot prototyping shield with a LSM303DLH compass/accelerometer.
The GPS is an EM-406.
Currently the XBee is a Series 1 XBee Pro 60mW, but I have a pair of 60mW 900 Pro's for when I want to use analogue video.
The camera is a Swann Wireless digital security camera/receiver kit.
When you watch the FPV video, remember both the XBee and the video link are both on 2.4Ghz!
There have been a few issues.
The Wild Thumper wheels look great, give way better ground clearance than the stock tracks, but...
It's one or the other I'm afraid, tracks or wheels.
All 4 axles have been ground half flat to go through the tread road wheels.
When you use the Wild Thumper wheel adaptor it leaves 10 -12 mm of half ground down, fairly soft axle.
I managed to bend an axle this morning, otherwise I would have shot some tread video.
The other @#$$%@ thing is those stupid $^%#!! "thumb" joysticks!
I know they are cheap, but wow!
There are 4 here, NONE of them have the same range or centre value, I tried all 4, used the least bad one.
But I did manage to get fairly smooth control.
I can see a D15 going on my Tx rig and using a "real" joystick that has trim controls.
Now that I have control from either a keyboard or my joystick, I will add heading hold.
That way I'll be able to point and let it drive itself.
In the prototyping stage is a sonar unit, I've left a large area up front for that.
I have a lot more body to build yet, I want this rover to be a bit weather proof.
Here is a longer video of Rover5, on patrol!
Here is the code for the Tx.
Is there another way to do this?
// Simple controller for my Rover 5
// On the rover end, direction keys are mapped out for a numeric keypad.
// speed is selected from z- 25%, x- 50%, c- 75%, v- 100%.
// at the moment any other key stops the rover.
// this programme takes X/Y values from a Sparkfun joystick shield
// and translates the 2 axis into a character from "1" to "9"
// at the same time we get a "speed" value based on how much stick was given.
// "z" -> "v"
// the speed command is sent first, then the direction command.
// I'm running this code on a Mega.
#define Joy_X_pin A0
#define Joy_Y_pin A1
#define statusPin 13
int rawX;
int rawY;
int xspeed;
int yspeed;
boolean ledState = false;
char speedCom;
char steerCom;
char speedArray[7][7] ={
{'v','v','v','v','v','v','v'},
{'v','c','c','c','c','c','v'},
{'v','c','x','x','x','c','v'},
{'v','c','x','z','x','c','v'},
{'v','c','x','x','x','c','v'},
{'v','c','c','c','c','c','v'},
{'v','v','v','v','v','v','v'},
};
char steerArray[7][7] ={
{'1','1','2','2','2','3','3'},
{'1','1','2','2','2','3','3'},
{'4','4','1','5','3','6','6'},
{'4','4','4','5','6','6','6'},
{'4','4','7','8','9','6','6'},
{'7','7','8','8','8','9','9'},
{'7','7','8','8','8','9','9'},
};
void setup(void)
{
Serial.begin(9600); //Turn on the Serial Port at 9600 bps
Serial3.begin(9600); //Turn on the XBee Serial Port at 9600 bps
pinMode(statusPin, OUTPUT);
}
void loop(void)
{
rawX = analogRead(Joy_X_pin);
rawY = analogRead(Joy_Y_pin);
xspeed = map(rawX,0,1023,0,6);
yspeed = map(rawY,0,1023,0,6);
speedCom = speedArray[yspeed][xspeed];
steerCom = steerArray[yspeed][xspeed];
Serial3.print(speedCom);
delay(50);
Serial3.print(steerCom);
delay(50);
ledState = !ledState;
if (ledState) {
digitalWrite(statusPin,HIGH);
}
else
{
digitalWrite(statusPin,LOW);
}
}
This works really well, but the way I've had to map out the dodgy thumb stick is a bit clunky?