This topic has 2 replies, 1 voice, and was last updated 8 years, 1 month ago by SuperDroid.

  • Author
    Posts
  • #3320
     SuperDroid
    Keymaster

    A customer wrote:

    Hello,

    I was asked to write a program that sends commands to the robot to make it move. This would be a ‘replacement’ to the XBox controller and software that came with the system. Is there a document that describes what commands the Ardunio system can accept?

    I hope that it would accept something like “move 2 feet at 30 degrees” but I don’t think I will have it so easy.

    Thanks for your help.

    #3321
     SuperDroid
    Keymaster

    The Arduino system only takes one packet type. If you look at the Arduino code we gave you, in the file WifiATRInterface.h you will see the packet structure (rxPacket). The relevant bytes in that packet for your robot are:

    rxPacket.driveChar — forward/back movement
    rxPacket.turnChar — rotation
    rxPacket.panChar — left/right strafing
    rxPacket.panHighChar — raise/lower scissor lift

    It will not take commands to “move 2 feet at 30 degrees.” You would need to give it a mix of drive/turn/strafe to get it to move in the right direction and you could monitor the encoder pulses using the data in the return packet to figure out how far you’ve moved. The encoder data is returned for each wheel; these are the bytes called FR_a, FR_b, FR_c, etc. in the return packet. FR for front right wheel, FL for front left, RR for rear right, RL for rear left. The scissor lift encoder bytes are in there as well.

    While running the WifiATR program on a PC, you can click Tools -> Debug Window to see the packets being exchanged between the PC program and the robot to help you in the development of your program.

    #3322
     SuperDroid
    Keymaster

    The customer replied:

    Thank you. This is just what I needed to get started.

Viewing 3 posts - 1 through 3 (of 3 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