Documentation > Instruction Manuals
Train Controller - 2.01.006
Introduction
Brick 2.01.006 is a WiFi enabled controller for LEGO® PF trains.
The controller supports bidirectional communication by means of MQTT messages.
Specifications
Installation
Configuring the Controller
The first step of the installation process is the configuration of the control to be able to connect to your WiFi network and MQTT broker.
This step only has to be done once as long as you don't change the WiFi network of MQTT broker settings.
The controller has to be configured with our nControl™ software;
this guide explains step-by-step how to do that.
Controlling the Train
Train Control Tiles on a Computer
This getting started guide explains how to
control your train with a control tile from a computer running nControl™.
Train Control Tiles on a Mobile Device
You can control the trains with a phone or tablet by exporting the nControl™ project to a web interface and opening that on your mobile device.
This guide
explains how to do that.
nControl™ Python™ Scripts
You can also control the train using Python™ scripts.
This course will help you getting started.
You can find all the available commands in our API Reference.
MQTT Commands
The following MQTT commands can be used to pilot the train controller with a DIY software application.
Note that, before you can communicate with the controller, you have to configure it: WiFi network, password, MQTT broker, etc. This has to be done with our nControl™ software, this page explains how to do that. Once the controller is configured, you can communicate with it using MQTT messages. When the controller is powered up, it will immeditaly try to connect to the specified WiFi network and MQTT broker; it will keep on trying until it's connected. To send data to the controller, publish messages using the topic nControl/Alias for you messages, where Alias is the name for the controller you specified during configuration in nControl™. To receive messages from the controller subscribe to the topic nControl/Alias. The information on this page is intended for personal, non-commercial, use only. Commercial use without prior written approval by 4DBrix LLC is prohibited. Battery Power bat
Requests the current battery power.
Auxiliary Device Commands cmd,2,data
Send data using a serial transmission over the auxiliary device port 2. Before sending data you first need to configure the port with the prt command.
Motor Commands mot,b,power
Move the train in the reverse direction.
mot,f,power
Move the train in the forward direction.
mot,s
Makes the train stop by simply turning off the motor power.
mot,s,reverse_power,delay
Makes the train stop using a reverse power pulse.
Port Configuration prt,2,digout
Configures the auxiliary device port (port #2) as a digital out port.
prt,2,serwri,baud
Configures the auxiliary device port (port #2) as a serial transmission port.
Digital Output set,2,high
Sets the output level of the auxiliary device port to high.
set,2,low
Sets the output level of the auxiliary device port to low.
set,2,value
Sets the output level of the auxiliary device port to the specified value using PWM.
Troubleshooting
nControl™ cannot connect to the controller with USB:
|