I figured this deserved its own post . I've completed my prototype controller that uses my Python code to control a Lionel layout. The software runs on (relatively) inexpensive Raspberry Pi computers, and the components in the control panel itself mostly came from Amazon. Excluding the Pi, there is less that $100 in parts in the picture below.
Here is a photo of the controller, all powered up:
I also have software support for a Train Brake, but I didn't leave enough space on my panel for it. I'm also missing one physical button, which will send the Engine Reset command when pressed.
The switches are all (on)-off-(on) momentary contact. The labels are self-evident, except for the boost and brake switch. If held in the up or down position, the boost or brake command is sent repeatedly, resulting in the selected engine/train speeding up or down, until the switch is released, at which point, the engine returns to its normal speed.
The "quilling horn" command is a simple linear pot that sends the "quilling horn" command with a value of 1 - 15, depending on how far up the lever is moved. When you return the lever to the bottom, the horn stops. Similarly, the Bell button results in a single ding if pressed and released, or uf held, turns the bell on or off, just like the Lionel Cab 2 and Cab 3. The Horn button blows the horn for as long as the button is depressed.
Here is a video that shows the panel at work: https://youtube.com/shorts/8Lv...?si=mD6XoV8rb7_KgIL6. I apologize in advance that it looks like a beaver with an overbite cut out the opening for the LCD display
In January, I'm working with a group in Lower, MA, Stephan Lamb Associates, to fabricate a nice looking panel I will place on my layout. They built my layout, and I couldn't be happier with their team and their work. In fact, I am going to have them build me a handful of panels to operate my Gantry Crane, Rocket Pad, Culvert loader & unloader, etc, as well as the generalized engine/train controller you see above. The accessory-specific panels will each contain a small Pi (probably a Pi 4 or a Pi Zero 2W), and will have the TMCC ID of the accessory they control "burned into" the code, rather than be selectable, as you see on the panel above.
I'm excited to be moving from the development stage into the control panel building stage!
-- Dave