NX control on Android


John P

Active Member

I've been using my time in jail lately to program a model railroad app! What the program does is implememt “NX” operation, a concept actually used in railroad control centers. It means “Entrance-Exit”, and what it does is allow an operator to set up a route through a complex area of track by pushing buttons corresponding to the two ends of a route, perhaps with intermediate buttons if they’re needed to define a single path where there might be multiple possibilities. The way I implemented this was to create a route which is shown in red, and this is held for a few seconds before it reverts to white; that’s done so that successively entered routes don’t clutter up the screen with red lines. The layout that's shown is one end of a freight yard on a club layout--the other end already has NX control, but it's done with a hardware-intensive setup using a microprocessor. It seems like a better plan to use a cheap Android tablet.

The program is not just using a lookup table to decide which switches to throw based on any combination of inputs! It opens an input file which includes the connectivity and the graphics for the railroad, and this could be of any degree of complexity. The algorithm steps through the diagram, exploring all the available branches until it finds a route.

What remains to be done is to get the Android tablet communicating via Bluetooth.
 
Wow, the video makes it look simple, but that's some deep thinking! It's amazing what the mind can come up with given enough time.
 



Back
Top