Sign In

Remember Me

Xbee, Sabertooth, joystick

Home Forums General Robot Discussion Topics Xbee, Sabertooth, joystick



This topic contains 3 replies, has 2 voices, and was last updated by  SuperDroid 4 weeks, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • 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.

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

You must be logged in to reply to this topic.

Skip to toolbar