This topic has 4 replies, 3 voices, and was last updated 4 years, 7 months ago by Saul Frank.

  • Author
    Posts
  • #7107
     jdolecki
    Participant

    I bought two Xbees from you to build this type of robot.

    Tech Thursday #023: Wireless Robot Control with an xBee

    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;

    #7108
     SuperDroid
    Keymaster

    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…

    #7109
     jdolecki
    Participant

    I built the same setup you show in tech#23

    Remote Joystick-arduino(uno)-xbee
    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
    // 0-255
    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?

    #7110
     SuperDroid
    Keymaster

    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.

    #7593
     Saul Frank
    Participant

    Thanks a lot for your reply!!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Login Register

©2024 SDRobots.com | All rights reserved.

Log in with your credentials

or    

Forgot your details?

Create Account