Skip to content

RR_duino_bus_controller: Introduction

manu-fwi edited this page Nov 28, 2020 · 9 revisions

This sketch enables an ESP8266 to control a bus (rs485 for example) of RR-duino nodes in order to connect them to JMRI.

Before uploading the sketch you must set this in config.h:

#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.

Once running

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).

Clone this wiki locally