====== Using A Bluetooth Serial Console on Your Android Device to Send Console Commands to Your DIGITAiL ====== ===== Getting The App ===== Find and install [[https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal|Serial Bluetooth Terminal]], by Kai Morich in the Play Store. {{:en:dev:serial_bluetooth_terminal.jpg?nolink&300|}} Note that any tool that can send data to Bluetooth Low Energy (BLE) devices is suitable for use. Another free tool that has greater capability (and complexity) is [[https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp|nRF Connect for Mobile]] by Nordic Semiconductor ASA. For this tutorial, we'll walk through the simpler, but also free, tool. ===== Connecting ===== To connect to the tail console, first turn the tail on and make sure the blue light is on and at a slow blink, indicating it is ready. Open the Serial Bluetooth Terminal application and select the hamburger menu icon in the upper left corner. This will pop out the main menu. {{:en:dev:terminal.jpg?nolink&300|}} Select "Devices", then select the device named "(!)Tail1". {{:en:dev:dt-devices.jpg?nolink&300|}} The menu will close, and you'll see the terminal attempt to connect. If the attempt fails (such as the tail is not on or ready), a "Connection failed" message will be produced and the connector icon in the top menu bar will show two disconnected plugs. {{:en:dev:dt-connected.jpg?nolink&300|}} Click the two disconnected plugs to restart the connection process. When it's completed, the tail's serial console is available, and simple text commands can be sent. ===== Sending Commands ===== Commands are case-insensitive. In this example, the command "ver" is sent, and the reply is "2.21". {{:en:dev:dt-ver.jpg?nolink&300|}} In this example, the command for a user-defined LED pattern is saved to Slot 1 using "USERLEDS U1P2N4A8A0S5S45", with the reply "OK". The pattern is then commanded with "LEDUS1", with response "BEGIN LEDUS1 END LEDUS1" {{:en:dev:ledus1.jpg?nolink&300|}} Macros can be set by pressing and holding any of the M1 through M7 keys. A macro is sent by merely tapping the respective key. ===== Additional Commands ===== Refer to the DIGITAiL Tail Protocol documentation for additional commands and command syntax. Note: The DIGITAiL can not be used while being charged by the power adapter. Caution: Short rapid changes of direction may wear down internal servo horns and cause excessive heat. Additionally, holding a move, where both servos are engaged for long periods, should similarly be avoided. == Copyright 2023 © The Mechanical Tail Company Limited contact@thetailcompany.com. All Rights Reserved. ==