This node is based on a Arduino Nano and will control 1 turnout and 3 signal heads from a JMRI CMRI Node connection and also read 5 sensors and report back.
I use a baurd rate of (9600) if you use a different speed you will need to change this in the sketch.
You can use this sketch in 2 ways as is. the first method is to use a usb cable. and the scond method is to use MAX485 Module TTL To RS485 Converter Board 3.3V 5V Power Supply For Arduino Automatic Flow Control Microcontroller.
The 3rd method you can use it the MAX485 Module RS-485 TTL which uses 3 wires connected to the Arduino.
The signals i use use a common anode type.
The sketch has been over commented to help you to understand how it works.
The signal head pdf needs amending in the future as SH4 is not required and was a mistake when I did the work.