Arduino Train Junior and PRO

The previous version of the program was very successful. She had a thoughtful UI and convenient logic. But the URB concept and the feedback brought a lot of new opportunities. Therefore, the old version is no longer supported. Sketches for the old version are compatible. You also can be update it using the command table below for added new features.

Instead of a long and not always successful manufacture of a real console with keys and rudders, Android app immediately gives you many advantages:

  • Works right out of the box. You just need to run the program on a smartphone or tablet.
  • Wirelessly. Bluetooth is integrated into any modern Android device.
  • Flexible and customizable interface. You can use several remote controls in one layout. Also you can just buy cheap simplest Android-tablets specially for the your model project. An interesting opportunity to use more than two consoles is interested discussed.

Arduino Train for Kids

Arduino Train Junior

Arduino Train PRO

 

Now PRO V.2 updated to multiview. The "settings" and "layout" windows is added.

You can order an individual custom version of the program for your layout (for example add turntable control).


Compare versions

# ArduinoTrain
BtControl
Arduino Train
for Kids
Arduino Train
Junior
Arduino Train
PRO
Version 3.4
1.1
1.0
2.1
UI
Two players mode
or independed control
2 different lines
No No No* Yes
Dependent behavior
of the loco's states
control elements
Yes Yes Yes Yes
Smooth thrust
(12 speeds)
No No No Yes
Slider Algorithm©
Improved Slider Control
Yes Yes Yes Yes
Reset button
Peripheria to the start position
No No Yes Yes
Horn button
Whistle sound
No Yes Yes Yes
Feedback mode
Autopilot features
No No Yes Yes
Number of controlled
junctions
2 0 4 12 and more
Number lines
of Lights
2 0 1 9 and more
Number lines
of Gears
0 0 1* 3 and more
Multi-window
Interface
No No No Yes
Scripts buttons
Auto trains behavior
No No No Yes
Sensors toggle
Disable/Enable layout sensors
No No No Yes
URBCreative Commons
ready
Yes Yes Yes Yes
Android
version
>4.3 >5.0 >5.0 >5.0
Download from Google Play:  
 
App manual
Obsolete Free 6 USD 16 USD

* - You can get around this restriction using
the second command station, but it's not so fun :)

♦ - Unique features of the program


URB Protocol: commands list
Updated 02/21/18

The control commands via Bluetooth or USB or serial come to the communication station. For their recognition needs rules for their formation, that is, the protocol. I invented the protocol commands. It is open, very simple and you can independently expand it.

Current version 2. Added new commands.

# Command Explanation Version Junior Version Pro V.2
THROTTLE 1ST PLAYER t0z
taz
tbz
t1z
tcz
t2z
tdz
t3z
tez
t4z
tfz
t5z
stop
speed 1
speed 2
speed 3
speed 4
speed 5
speed 6
speed 7
speed 8
speed 9
speed 10
full
yes
 
 
yes
 
yes
 
yes
 
yes
 
yes
all yes
THROTTLE 2ND PLAYER u0z
uaz
ubz
ucz
udz
uez
ufz
ugz
uhz
uiz
ujz
ukz
stop
speed 1
speed 2
speed 3
speed 4
speed 5
speed 6
speed 7
speed 8
speed 9
speed 10
full
all no all yes
DIRECTION 1ST DRIVER drz
dfz
dsz
d1z
reverse
forward
stop
release
all yes all yes
DIRECTION 2ND DRIVER dnz
dvz
doz
d2z
reverse
forward
stop
release
all no all yes
JUNCTIONS / SWITCHES jaz
jbz
jcz
jdz
jez
jfz
jgz
jhz
jiz
jjz
jkz
jlz
jmz
jnz
joz
jpz
jqz
jrz
jsz
jtz
juz
jvz
jwz
jxz
switch 1

switch 2

switch 3

switch 4

switch 5

switch 6

switch 7

switch 8

switch 9

switch 10

switch 11

switch 12
yes
 
yes
 
yes
 
yes
 
all yes
RESET JUNCTIONS POSITION TO DEFAULT j0z   yes yes
ARM SWITCH JUNCTIONS s1z
s2z
ENABLE
DISABLE
  yes
LIGHTS l1z
l0z
laz
lbz
lcz
ldz
lez
lfz
lgz
lhz
liz
ljz
lkz
llz
lmz
lnz
loz
lpz
lrz
lsz
lwz
lxz
ALL ON
ALL OFF
Channel 1

Channel 2

Channel 3

Channel 4

Channel 5

Channel 6

Channel 7

Channel 8

Channel 9

Random
 
 
yes
all yes
GEARS gaz
gbz
gcz
gdz
gez
gfz
g0z
Gear 1

Gear 2

Gear 3

ALL OFF
all no all yes
SENSORS s3z
s4z
ENABLE
DISABLE
all no all yes
AUTORUN a1z
a2z
Script 1
Script 2
all no all yes

Used first letters: a, d, g, j, l, t, s, u
Forbidden letter: z
Reset command: 00z

Conclusion

For Arduino there is a very large number of protocols for data exchange. For example, Firmata or NMEA 0183. But they are all complicated for this project. In railway model, there is not a lot of data flow and the speed of passing the team is also not very important. Therefore, you can use a very simple protocol. It consists of three characters, the last character - "z" indicates the end of the command. Combination of the first two letters or numbers gives a lot of variants the commands. The ArduinoTrain BtControl and Arduino Train series Apps use it's protocol.

For example, switch junction 1 command are "jaz" and "jbz". You can expand the number of combinations simply by adding the fourth and more characters. In the sketches of Arduino they are parsing by such a well-known block:

In ATBTC PRO V. 4.4 and Arduino Train Apps (Junior and PRO) added simple feedback commands, like Bluetooth.print("az").


if (inputString.charAt(0) =='j') {

  if (inputString.charAt(1) =='a') {
    // junction 1 left position
    Bluetooth.print("az"); // feedback command
  }

  if (inputString.charAt(1) =='b') {
    // junction 1 right position
    Bluetooth.print("bz"); // feedback command
  }
}

You can type these commands directly into the terminal of Arduino IDE, and see how the switch junction.