- June 23, 2019 at 6:53 pm #7107jdoleckiParticipant
I bought two Xbees from you to build this type of robot.
Ii followed the code posted but after two weeks i still cant get it running properly. So i have a few questions.
is the sabertoorh set for Packet serial or simple serial?
Do you have the setup parameters for the xbee’s??
If the saber tooth is looking for a -127 to 127 to command the motors why do you shift it im the remote code to 0-256??
tempFB = tempFB + 127;
tempLR = tempLR + 127;June 23, 2019 at 11:39 pm #7108SuperDroidKeymaster
Don’t know of a way to go direct from xbee to sabertooth. We usually use a micro controller in between to process the serial packets between the xbees and then read joystick or control the sabertooth. The xbee logic level is 3v, the sabertooth is 5V, so you will have to level shift too…June 24, 2019 at 9:29 am #7109jdoleckiParticipant
I built the same setup you show in tech#23
Robot Xbee-arduino(Uno)- sabertooth
When i run the arduino code as shown the one wheel on the robot starts running right away and the other wheel works by joystick.
I read that the savertooth need to see a -127 full reverse, 0 off 127 full foward. But you remote code shows
// Shift analog data up so we have a range of
tempFB = tempFB + 127;
tempLR = tempLR + 127;
When i comment out these lines the robot works by joystick but wont go in reverse??
So for this example is the saber tooth set for simple serial or packet serial?June 24, 2019 at 9:43 am #7110SuperDroidKeymaster
We always use packet serial with the Sabertooth. Make sure your dip switch settings are correct (1 and 2 down, 3-6 used to set the serial address). You are correct about the data ranges being [-127, 127].
Try debug printing the values that you are sending to the Sabertooth (Use Serial.print(value) in your code, watch the output using the Serial Monitor in the Arduino IDE) to verify that you are getting the expected output values in response to your joystick movement.
You might also check the joystick values that the Sabertooth arduino is receiving from the remote xbee arduino. Just break the overall system down into subsystems and try to isolate where your problem is.May 4, 2020 at 11:04 pm #7593Saul FrankParticipant
Thanks a lot for your reply!!
You must be logged in to reply to this topic.