The owner of the garden railway suggested that I write a special application for its hobby. Prior to that, he tested the DEMO2 application on his locomotive, and suggested several improvements. As a result, I wrote a new application with extended functions that controls the same Arduino hardware as the rest of my projects. Since in this project Arduino is installed directly on the train, unlike the URB project, everything becomes simpler.

You can install the system presented here on several locomotives and control them by choosing the MAC address of a specific BT- module installed on the locomotive.

Connect App to different locomotives

Push Bluetooth Icon

Choose the loco by MAC address

Connect established

Push icon again for disconnecting, and reconnect to another loco

Commands to control train

The application sends a simple list of four-character commands via Bluetooth to Arduino, witches you can use yours functions into the sketch.

This example does not use all commands. By adding additional devices to the circuit (for example, a servo drive and a mini MP3 player for Arduino), you can use the functions of sounds and decoupling. There is also a switch CUSTOM which you can use at your discretion.

The application also uses feedback from the locomotive and shows the battery level of the locomotive.

Full description of the API, see on my website.