MasterFeatureGraphic800w

BT Bot Control is an Android application that allows you to remotely control a micro controller-based robot using Bluetooth (i.e. Arduino).  It also allows you to (optionally) view a video stream from an IPCamera mounted to your robot.  This could be any type wireless IP camera or phone that has the ability to broadcast a video stream/images to the web.  Example Foscam, Ai-Cam etc.  If you are looking to control your robot over WiFi, check out WiFi Bot Control.   *** BT Bot Control is no longer available.

Features:

  • Use Joystick via finger movement, or the orientation sensor on your device.  (default is Joystick mode).
  • Ability to poll and display sensor and other data from your micro controller.
  • Supports 8 individual commands via Command Buttons.   4 on by default. 4 more can be turned on in the Settings section.
  • Sends the x/y coordinates as positive and negative integers based on 4 quadrants of the joystick.   Data is sent via Bluetooth and can be parsed to set both direction and velocity.  (sample code below)
  • Coordinates are generated as X+/- and Y +/-. These are packaged and sent in the following format sX=val,Y=vale  i.e. sX=75,Y=-55e  where ‘s’ indicates the start and ‘e’ indicates the end.
  • Command button values are packaged and sent in the following format: sC=[val]e  i.e. sC=2e  where ‘s’ is the start,  ‘c’ indicates the a command button as pressed, ‘2’ is the value and ‘e’ indicates the end.
  • Configurable Bluetooth packet send interval – used to set the speed (quantity) of packets sent.  Default of 200ms works well.
  • Shows video stream of IP Camera mounted to robot. (see FAQ below for important tips on getting your IP Camera working)
  • Configurable camera URLs (3). Remembers last camera connection for easy re-connect.
  • Configurable Bluetooth connections.  Remember last Bluetooth connection for easy re-connect.
  • Sample Arduino Sketch provided (below).
  • Screen auto re-sizes for smaller phones.
  • Supports any micro controller that can parse Bluetooth data (bluetooth module required).
  • Should be compatible with other Bluetooth / Arduino modules such as the BLEduino, RFduino, Arduino Bluetooth Shields the Cortado, and many others.    Please drop me a line if you get it working with other BT devices and I will update the list.  Update (2015) – lately, a number of fully integrated Arduino/Bluetooth micro controllers have come to market via Kickstarter.  This app is not particular. As long as the controller / bluetooth module can connect to your Android smartphone, this app will work.

Note on Lite version:  The Lite version is a fully functional version.  However, Bluetooth data will be sent as ‘9’s.  i.e. s9,9e and c9e which will provide you with enough to determine if this app is right for you.  If you like BT Bot Control, the Pro version has full functionality enabled with proper data, and can be yours for less than the price of a coffee.  Also, you won’t be pestered by that start-up message either!  We hope you agree that the features and functionality provided are well worth the pocket change. 🙂

Note on Bluetooth: The control distance is dependent on a number of factors including; your Bluetooth device range, battery power, obstacles etc. Typical distance for Bluetooth is 10 meters for most Bluetooth modules.  However, higher classed BT modules could extend the range.


Get BT Bot Control:

Get it on Google Play

If you are an existing BT Bot Control user, drop me a line on your project so I can feature it here.


Arduino Sample Sketches:

BT Bot Control – Recent Versions:

This version includes sample code to demonstrate sending data from the Arduino to BT Bot Control (you must have v 5.1.0 or later).  It uses a Timer (library here) to call sending data every second (recommended).

BT Bot Control – Earlier Versions prior to v 5.1.0:

Note:  For this project, I used a Digispark (Arduino-based micro controller).  This sample sketch is targeted for a Digispark (ATTiny85), but was also tested on an Uno, so it should work for most Arduino’s.   If using an ATTiny, remove any Serial.Print statements. Also watch the size of the sketch as there are limitations on the ATTiny85.  


Displaying Sensor Data in BT Bot Control:

BT Bot Control (version 5.1.0 (14)) now has the ability to display sensor and other data from Arduino.  Before getting into specifics, note that this feature is experimental due to the nature of both the joystick and sensor data using Bluetooth at the same time.  Adding sensor polling may slow the robot’s response to joystick movements.  Be sure to test this feature before implementing.

On the Arduino side, you need only add Serial.Print() commands to print sensor / data results to the serial port.   The data also requires a start and end delimeter.  For BT Bot Control, the “>” (start) and “<” (end) delimeters are uses.  If you are passing more than one data item, each much be separated by a pipe character “|”.  A simple single item example would be Serial.Print(“>MyData<“);   This would display “MyData” once BT Bot Control has been configured.  When enabled in BT Bot Control, the sensor / data information will show at the bottom of the main interface.

In BT Bot Control, go to Settings, check the box for “Enable Sensor / Data Polling“.  This will reveal other options as follows:

  • Manual / Timer base polling.  In manual mode, you have to click the refresh icon that will be shown beside the data.  Timer-based polling will automatically poll ever X seconds.  The frequency can be configured by moving the slider (ranges from 1-30 seconds)
  • Data Element Titles.  This allows you to give each data element a title.  If left blank, the app will use default values.  i.e. Result =.    To add titles, separate each item by a comma.  i.e.  Temperature =, Humidity =. Save the changes when done.   Note that each title will be assigned to each data item parsed in the order it was passed.  (example below)

Example Arduino code:

//Include and initiate the Timer library in the header section

#include “Timer.h”    //get it here: https://github.com/JChristensen/Timer

Timer t;

//in the void Setup() section add the below code:

int sendData = t.every(1000, doDataSend);

//At the beginning of void loop() add:

t.update();  //timer for sending data

//The below flag is included in the code to stop data from being sent when data is being received from the joystick.  It is highly recommended that this is include.  The value is set to true in while(Serial.available() > 0) and set back to false after the motors are driven or turned off.

receivingCommands = true;

//Here’s a sample showing  data being sent.  Note that passed data must begin with a “>” and end with a “<” delimiter.  All data sent via Serial.print within these delimiters will be passed to BT Bot Control.

void doDataSend()
{
//TESTING PRINTING SENSOR DATA TO BT BOT CONTROL
if (!receivingCommands)
{
Serial.print(“>”); //Start of String
Serial.print(counter);
Serial.print(“|73%”);
Serial.print(“|25° C”); //degrees = ALT + 0176
Serial.print(“|item4|item5”);
Serial.println(“<“); //End of Content
counter ++;
}
//END TESTING PRINTING SENSOR DATA TO BT BOT CONTROL
}

Based on the above example there are 2 data elements being sent.  If you did not configure any titles in Data Element Titles, the results would look like this:  Result = 75° Result = 45%  If you added two titles; Temperature =, Humidity =.  You would get Temperature = 75°  Humidity = 45%

 Note:  During testing, it was observed that a sketch that ran very fast (i.e. with little delays), would not render data well to BT Bot Control.  If this happens, try adding delay (100); or more to your code.  Also note that this will affect the joystick commands and how the robot is driven. Alternatively, you can get creative by having the sensor data only send every x cycles (i.e. if your delay is 10 ms, put the sensor data print commands in a function and call them every X iterations.  I suggest having them sent every 1 second.

Note that any Serial.Print command that is placed within the “>” and “<” will be parsed by BT Bot Control and displayed.


Bluetooth Wiring for Arduino (Nano)

Arduino Nano Bluetooth Wiring

[qa cat=BTBotControl-FAQ]


Video:  BT Bot Control In Action


Video:  BT Bot Control Bluetooth Connection Testing


Pictures of CamBot:

BTBotControlScreenArtweb


User Projects

Check out Umur’s Omnidirectional Bluetooth Controlled Robot:

 

Check out Jon’s Place for a very cool 3D printed roboot.

Jon's Robot

RC Truck

RC Truck using BT Bot Control