Trying to think ahead...
Geoff, thanks for soaking up all my spare time with this!!! Something I had tried to envision but failed to be able to get the big picture to work.
I had an Arloco (for 16 inputs) and Arduino talking to LocoNet, and built a JMRI script that took inputs and translated them to control a loco, but the resulting throttle always had to be connected with a Loconet cable.
A friend and I will be building throttles (OK, I'll be building two, but he's the instigator, I mean friend, with the suggestion), and I am going to meet with him tomorrow on some of the various questions I have come up with. Since others are building this, I figured I should share my thoughts, some of which may be helpful, some of which may be leading down a rabbit hole.
1. If I put the OFF/ON switch on top, this might fit in a throttle pocket. Or maybe a smaller, slide switch on the side...
2. I was considering the various functions to be controlled by the throttle. In addition to the speed setting and direction, I definitely want headlights, bell, and horn/whistle, What about 1. Dim? 2. Short horn? (maybe), 3. Fans?, 4. Dynamic brakes?, 5. Mute? 6. Shutdown?, 7. Crossing cadence?, 8. Brakes?, 9. Coupler sound?, 10. Notch Up & 11. notch down manual?, 12. Emergency stop?
3. Location of the controls: one-hand operation is one feature some people really like about the simple Digitrax throttles (direction control on top, big knob for speed). I took a scrap piece of plastic (ok, I sacrificed an Ikea plastic container) and made a mock-up of the top. If my horn button were in the middle just above the battery, my thumb could rest on it while my thumb and 1st finger could easily reach the speed knob when needed. Holding the throttle in my left hand (I'm right handed) lets me fiddle with uncoupling or throw turnouts with my right hand, and I don't have to look at the throttle to be able to find all the normal functions while driving a loco. I am waiting for parts, including one inch diameter knurled aluminum knobs which should be easy to manipulate. Of course, once I get all the parts, I will be dry fitting to verify spacing before I drill.
4. If I primarily use just one loco, I figured I would put that in as a default. I would program the decoder therein to match the functions I put in the throttle. However, if I had several that I might use, I had toyed with the idea of a rotary switch which would select one of several specific pre-programmed locos that I would add to the code.
5. I am learning Arduino coding so I may be way off base here. I was thinking, if I code it right, the change in speed could be "throttled" in addition to any momentum built in the the decoder. That is, if I have Neutral, but change the knob (for example, to full speed or off), I think that as coded now, nothing reacts until I select Fwd or Rev. But I figured if the difference between the actual speed being sent to the loco and the new setting of the knob were too different, or if direction was changed at speed, the throttle could know that and react accordingly. I've heard people talk about "Neutral drops" in rental cars, but a loco shouldn't be abused like that (not that cars should either, but...).
6. Roster selection as a feature is way above my pay grade. But, I had planned to look at the open source code for Engine Driver to see if I might get a clue as to how JMRI WiThrottle broadcasts that info. Hmm, I wonder what a plain communications program (is there such a thing anymore? ProComm was my go to tool with the 300/1200/2400 baud modems I started with) would show if connected to the IP and port of WiThrottle.
7. Wifi settings (SSID, password) and IP numbers are hard coded. I figured I would load the IDE on my laptop to allow me to re-code when I was off-site (visiting to operate on someone else's layout for example).
Thanks again for your time, and your continued contribution to the world's greatest hobby.
Phil in gorgeous Young Harris, Georgia, USA