Wireless RC Robot with Arduino and XBees

Pages
Contributors: bboyho
Favorited Favorite 2

Troubleshooting

Not working as expected? Below are a few troubleshooting tips to get your micro:bits working as expected. For your convenience, relevant troubleshooting tips from the RedBot experiment guide were included below.

  • Having issues uploading?

    • Make sure your USB cable is plugged into both the robot and the computer you're using to write code.
    • Make sure the "POWER" switch is switched to "ON."
    • Double check that you have the right serial port selected under the "Tools" menu. The easiest way to check is to see which item disappears from the menu when you unplug the USB cable, and select that one when you plug the board back in.
    • If you have an Xbee module plugged in, make sure the Serial Select switch at the top edge of the board is switched to "XBEE SW SERIAL."
    • Check that you have the right board selected under the "Tools" menu. The Wireless Joystick uses the "SparkFun SAMD21 Dev Breakout" while the RedBot Mainboard uses "Arduino Uno". Also make sure that you have the correct COM port selected for each respective board.   

  • My RedBot is not moving!

    • Make sure that the switches are set to the correct position for POWER, MOTORS, and XBEE SW Serial.
    • If you are using batteries, make sure that they have enough power.
    • Make sure that the XBees are configured correctly.   

  • My RedBot is not driving straight! It is spinning or driving backward!

    • Make sure that the motor wires are wired correctly.
    • You can also adjust the code to tell what direction the motors to spin. Since the code is based on the setup used in the RedBot assembly guide, it would be easier to adjust the physical wire connection.   

  • My RedBot is not driving straight! It drives in a curve!

    • This is a pretty common thing for the RedBot, and for all robots with independent drive wheels. There are lots of reasons for it, but it's something that simply must be dealt with. Here are a few possible reasons:
      • First -- check to make sure that there is nothing rubbing on either the wheels or on the magnetic motor encoder. Move the wheels out so that they are not rubbing, but still tightly seated into the motor. Any added friction on one side will cause one side to drive faster than the other (resulting in the RedBot pulling to one side.)
      • Second -- Driving straight requires equal power on both wheels. This requires equal amounts of traction on both wheels. Running the motors up at full power sometimes causes the wheels to "spin out" and lose traction. Try reducing the motorPower to something lower than 255.
      • Third -- use an encoder from the kit to ensure that both wheels turn the same distance each time.