×

PC Control These demos and projects allow the robot to be controlled via a computer.

ArbotiX Commander Control - These demos and projects control the Robot using the ArbotiX Commander, the handheld Arduino based remote control.

Direct Control - These demos and projects control the Robot directly from sensors connected directly to the Robot's control board.

Pose Control - These demos and projects allow you to create and playback a sequence of poses.

Serial Control - These demos and projects control the robot using a serial packet protocol.

Standalone - These demos and projects are deisgned to let your robot function without a computer or additional microcontroller.

Wireless Control - These demos and projects allow you to control the robot wirelessly - usually by replacing the Serial Connection with XBee modules.

Reference - These articles have technical details regarding the control and operation of the robot.

×

More info here

BT Commander V1.2 Getting Started Guide

This guide will help you install, set up, and use BT Commander. BT Commander is an Android app designed to emulate an ArbotiX Commander. The ArbotiX Commander is an Arduino based hand-held controller, compatible with all ArbotiX-M based InterbotiX Robots.

Prerequisites

BT Commander requires that you have a smart phone or tablet with bluetooth running a current version of Android OS (This version of the guide has been tested on Android Version 4.4.2 "KitKat"). You can control any robot that meets the following criteria:

  • Has a Bluetooth Module
  • Can Communicate at 38400 bps over a UART serial port
  • Can read the Commander Data Packet

The ArbotiX-M Robocontroller meets all of these requirements when paired with a bluetooth module such as the Grove Serial Bluetooth V3, and can interpret the commander packet using the Commander library. The ArbotiX-M Robocontroller is used in a majority of InterbotiX Robots, making an entire line of crawlers, arms, and turrets easily compatible with BT Commander. Just load the appropriate firmware on to the Robocontroller, plug in a configured Bluetooth Module to your Robocontroller and you can control the robot!

Note: We recommend using the BT Commander App with a Phone or Tablet with a minimum screen resolution of 360x640.

Complete your Robot's Getting Started Guide

Before you get moving on the control scheme, make sure to go through the Getting started guide to set up and assemble your robot. For your convenience, here is a list of guides for the robots that have pre-written commander packet compatible code. You can ignore references to the XBee and the ArbotiX Commander controller in these guides, and focus on the section regarding setting up the commander compatible firmware on your robot.

phantomXQuadrupedMain.jpg

PhantomX Quadruped

hexmetal.jpg

PhantomX Hexapod

The commander code will work with all other InterbotiX robots running on an ArbotiX-M Board. We are testing and making code changes for them currently. If you have questions about using BT Commander with any of the other InterbotiX robots, please contact This email address is being protected from spambots. You need JavaScript enabled to view it. for assistance. It is possible to make robots other than the crawlers function with this code by commenting out a timeout routine, as shown here:

codeshift.png

Configure the Bluetooth Module

For this guide, we are going to use the Grove Serial Bluetooth V3 module for its stability, ease of operation, and low price point. There is a guide from Seeed Studio that can take you through the initial setup of the Grove Serial Bluetooth V3 here, but everything you need to know to get this module up and running will be covered in the guide below.

There are many bluetooth modules to choose from that will work with this project. If you have a BlueSMiRF Gold, check out this guide for setup details.

Serial Bluetooth v3.0 Pin USB FTDI Cable Pin
GND Black Wire GND
VCC Red Wire VCC
RX White Wire TXD
TX Yellow Wire RXD
b_400_400_16777215_00__images_projects_BTCommander_bluegroveFTDI.png

Connect your Bluetooth Module to your FTDI USB Cable, plug into your computer. If it is connected correctly, the bluetooth module's light will turn on, flashing green.


b_400_400_16777215_00__images_projects_BTCommander_bluegroveuartsbee.png

Alternatively, you can use a UartSBee interface to reach the same result.


b_400_400_16777215_00__images_projects_BTCommander_programSMiRF-1.png

Open your Arduino IDE and select the appropriate COM port.


b_400_400_16777215_00__images_projects_BTCommander_programSMiRF-2.png

Open the Serial Monitor.


b_400_400_16777215_00__images_projects_BTCommander_bluegrove1.jpg

The Bluetooth Module defaults to 9600 baud over serial, and requires you to use No line ending to send AT Commands.


b_400_400_16777215_00__images_projects_BTCommander_bluegrove2.jpg

The first command we are going to send it will set the baud rate to 38400. Send the line AT+BAUD6 and it should return "OK+Set:38400"


b_400_400_16777215_00__images_projects_BTCommander_bluegrove3.jpg

Having adjusted the Baud rate, we now need to select 38400 baud from the dropdown to continue sending commands to the bluetooth module.


b_400_400_16777215_00__images_projects_BTCommander_bluegrove4.jpg

The next command we will give the module is AT+ROLES, which sets the device in Slave Mode.


b_400_400_16777215_00__images_projects_BTCommander_bluegrove5.jpg

Now we will name the module so you can easily identify it when it comes time to connect to it. Send AT+NAMEyournamehere to the device, replacing "yournamehere" with any alphanumeric name, no special characters, up to 12 characters long.


b_400_400_16777215_00__images_projects_BTCommander_bluegrove6.jpg

Finally, we need to set the pin, so that you can securely connect to your device. Do this with the command AT+PIN1234, replacing "1234" with a 4-digit code that you can easily remember. You should now unplug your bluetooth module from the FTDI cable.

Connecting Bluetooth Module to ArbotiX-M

Now that your ArbotiX-M is programmed and your bluetooth module is configured and ready to go, we need to connect the bluetooth module to the appropriate pins on the ArbotiX-M. Follow the diagram.

Serial Bluetooth v3.0 Pin ArbotiX-M Pin
VCC Analog 7 Center Pin
GND FTDI GND
TX FTDI RXD
RX FTDI TXD
b_400_400_16777215_00__images_projects_BTCommander_bluegrove-connect_bb.png

Note that this project requires that your FTDI pins and Analog 7 be free at the time of operation. An XBee Module cannot be used when the Bluetooth Module is connected to the ArbotiX-M. The Bluetooth module cannot be plugged in while you are programming the ArbotiX-M.

Install APK to Android Device

BTQR.pngbt-commander-icon.png

If you have a QR code reader, you can scan the above QR code and it will take you to the current .APK download of BT Commander. Otherwise, direct your device's browser to this link to download. Install by opening in your device's file manager and following the prompts. You should see the BT Commander Icon in your programs list once it has completed install.

Running the Code

Running the BT Commander is easy and fun! Let's start with the basics.

b_400_400_16777215_00__images_projects_BTCommander_phone1.png

First, make sure the robot/device you wish to connect with is on, and the bluetooth module is flashing green. On your phone or tablet, open your bluetooth manager and scan for devices.


b_400_400_16777215_00__images_projects_BTCommander_phone2.png

Select your device, and enter the pin you set earlier.


b_400_400_16777215_00__images_projects_BTCommander_phone3.png

Your device should now be in the Paired Devices list. You will not have to repeat the pairing process in the future.


btcommanderIcon.png

Once it is paired, open the BT Commander App on your phone or tablet.


b_400_400_16777215_00__images_projects_BTCommander_phone4.png

You should be greeted with the Bluetooth Connect screen. Select "Connect to device"


b_400_400_16777215_00__images_projects_BTCommander_phone5.png

A list of bluetooth devices will appear. Select your bluetooth module from the list.


b_400_400_16777215_00__images_projects_BTCommander_phone6.png

The app will return to the Bluetooth Connect screen with the words "Connected" in the Link Status. The light on your bluetooth module should now be solid. At the top of the screen, there are currently two controller choices, Basic and Smooth.


b_400_400_16777215_00__images_projects_BTCommander_phone7.png

The Basic Controller has a Speed Slider and two simple Directional Pads. By selecting a speed and pressing a direction, you can easily control your robot.


b_400_400_16777215_00__images_projects_BTCommander_phone8.png

The Smooth Controller acts more like the analog joysticks on the ArbotiX Commander, choosing the speed based on how far out from center each joystick is dragged.


When you are finished controlling your robot, just go back to the Bluetooth screen and select Disconnect.

Going Further

Once you've set up your Commander, there are plenty of things you can do! BT Commander was created in MIT App Inventor 2, and the project is open source. Here are some resources for anyone interested in building upon this program:

The Commander is very much designed to handle the control end of the robotic processes. The behavior that is expressed by the robot on receipt of these packets is determined by the Arduino Commander Code written to the ArbotiX-M. If you would like to change the layout, look, or behavior of the controller in specific, altering the BT Commander code is the way to go. To change the robot's behavior when it receives a commander packet, altering the Arduino Commander Code downloaded in the Wireless Handheld Controller Guide is your ticket to success.