So after an extensive look at example code I was able to smooth out those shakes. I ended up adding a delay() and servo.detach() after each servo.write() statement. With a lot of bench testing I am now able to turn the board and see the wheels turn in kind towards the offending waypoint.
Now what... guess I need to figure out how to go forward! I made another cable with some servo extensions and plugged everything into the arduino. After more fiddling with the stock speed controller on the Traxxas (the ESC XL 5 was set to training mode or something) I got regular servo commands to spin motors.
Yay!
So now I have left right and forward. Now I need to capture some gps data on my street to get multiple points for this thing to follow. I built an arduino stack with an xbee shield and the gps shield (both retail kits) with the thought I would strap this puppy down with some zip ties. With everything secured I then could tear up asphalt and wirelessly obtain my waypoints. Unfortunately I only get a few lines of lat/lon data before the wireless connection binds up and freezes on the serial monitor.
After a beer I came to the conclusion that the serial stream from the xbee (9600 by default) was probably binding up the flow of data from the gps and my print statements. I recalled reading in the Sparfun gps shield example that the baud rate needed to be 115200 to keep things nice. That or my arduino was browning out with my janky 9V battery connection... After another beer I decided that even if I was wrong I should be able to tinker with google maps and come up with some approximate points for testing.
Soon I hope to have the hardware stack rebuilt to put the bench test model onto the frame.
No comments:
Post a Comment