-
Notifications
You must be signed in to change notification settings - Fork 1
RR_duino_bus_controller: Introduction
This sketch enables an ESP8266 to control a bus (rs485 for example) of RR-duino nodes in order to connect them to JMRI.
#define WIFISSID "YOUR SSID"
#define WIFIPASS "YOUR PASSWD"
#define SERVER_IP "192.168.0.22"
#define SERVER_PORT 50011
Replace 192.168.0.22 by the IP Address of the computer running the "jmri-RR-duino/RR_duino_jmri_monitor.py" python script and correclty sets your WiFi information.
The led on the esp8266 will blink rapidly when waiting for WiFi connection and once a second when connected to the WiFi.
The sketch will try to connect to the python server as long as needed.
In the meantime it will connect to any node on the bus it controls; it will try all addresses from 1 to 62 and add the nodes it finds, unless it connects to the python script that explicitly unsets the auto-discover mode (more on this on the python script page: jmri_to_rr_duino_busses).
Also "dead nodes" will be woken up: eg you disconnect a node, it will go down, and when you plug it back in it will be woken up (may take some time).