A software to controll SBB split flap display via serial port (RS485).
fallblatt-module is a node JS application that allows you to controll SBB split flap display via serial port. It offers a webinterface, and two API (Websocket and REST).
The split flap display need to be connected to the a computer via a RS-485 serial port. Please refert to documentation du see how to proceed with serial and power supply.
- SparkFun USB to RS-485 Converter
- Any computer (Raspberry PI 3 is a good option)
- 30VDC power supply
To install the software run npm install in command line.
npm install
Then you have to do some configuration
mv config/config-sample.json config/config.json
In config.json
- set your serial port path
- set the module address (generaly written on the module itself
- set a type for the module (any name)
Then you will have to map the messages. In config/module-mapping create a json file named after the module address (i.e 53.json) . Just enter all the messages you have on your split flap display.
You can run the software in command line via
node server.js
You can control the module via command line by taping any command in command list.
You can access a web app via your browser. The adresse is http://<ipAddress>:3000/.
A socket.io API is available at http://<ipAddress>:3000/. Use any command in command list.
You can control the module via a REST API available at http://<ipAddress>:3000/<command>/. Any command that change module status is a POST request. All parameter are passed directly in the URL, i.e:
http://<ipAddress>/random/start/10/5
An ionic app is available to controll multiple module on the same network. Please see fallblatt-mobile for more information.
- status: return the status of the software
- message: return the current message
- list: return a list of all available messages
- position: return the current position
- reset: move the module to initial position
- move <destination>: move the module to a specific position
- step: move the module one step forward
- find <message>: move to string (can be partial)
- random <action> [duration] [variation]: set random mode (action start|stop duration/variation in seconds)
- turn <action> [duration] [variation]: set turn mode (action start|stop duration/variation in seconds)
All the documentions come from # eni23/sbb-fallblatt.