Loading...

Ways to control the T-Bot

The simplest way to control the T-Bot is to download Joystick bluetooth Commander. Simply install the app on your Android device and you can get started.

Open Joystick bluetooth Commander and follow the steps below:

Configure Bottons

Setup the buttons to look like the first image below.

Bytton Labels

Now do the same for:

  • Button 2 Label > KPS-
  • Button 3 Label > KP+
  • Button 4 Label > KP-
  • Button 5 Label > Trim+
  • Button 6 Label > Trim-

Setup the data fields.

Bytton Labels

Now do the same for:

  • label # 2 > KP
  • label # 3 > Trim

Connect your android device to you T-Bot

Close Joystick bluetooth Commander and pair your Android device with your T-Bot

Connecting

Open Joystick bluetooth Commander and follow these steps:

Connecting2

The most important thing you will have to change on your T-Bot for now is the trim. You can can use the Trim+ and Trim- buttons to adjust this. If your T-Bot is rushing forward, press Trim- repeatedly until the drift is removed. Likewise, if your T-Bot is rushing backwards press Trim+ repeatedly until the drift is removed. Once you're happy, you can hard code the trim value into the TBot.ino file. Look for the following lines and set gtrim to the value showing in the Trim datafield (3.0 in the example above). You can now upload the T-Bot.ino code to the T-Bot to make the change persistent.

////////////////////  Speed and Stability tunings   /////////////////////////

float gtrim = -1.25;   // Compensated for drift in forward or reverse direction.

float rtrim = -0.0; // Compensated for rotational drift.

Controlling the T-Bot using Python

Open Controller.py in a text editor. Add in your T-Bot's mac address you found in Step 2 - Setting up bluetooth module.

bd_addr = '98:D3:32:11:4C:CF' # put the bluetooth address of your T-Bot here.

Then launch a command terminal in windows or a console in Linux or Mac and type the following to launch the Joystick:

python3 Controller.py

TBot Controller