So I've taken a break from the output controls, where I'm working on breaking out my functions into classes to make configuration easier, to work on inputs.
Basically, I had done all my testing with 5-6 buttons of input. That's dandy until I went to hook up like 25 inputs (because why not?) and realized... shit, I have 10 inputs available, total, on this board layout. Whoops.
Solution: 16 channel multiplexers. Basically that lets me use 10 pins on the Arduino and read 32 channels of data. I'm planning on 24 channels of digital input (basically a switch) and 8 channels of analog inputs (for whatever). It's hella fast on the channel roll for picking up the signals, but I'm not sure how fast it'd be for a really quick sensor, but, honestly, is that needed? Probably not. The inputs will be ground switches, so basically you can hook up a bunch of stuff like window switches, power door lock switches, turn signal, headlight, whatever, and just set them up with a ground on one side and this box on the other side.
Basically you can then send the input pin that you plugged that into to a downstream module (just one command to edit) and save the code and it'll tell the downstream module it was pressed (within about 30 ms at the slowest), and then you can have that box do whatever you want with that data and then trigger an output to ground itself (to fire a relay, or you can pulse width modulate or whatever). Right now I have it set to be a momentary switch (think headlights of power windows), a virtual latching switch (so you can hit a momentary switch but "latch" the relay, locking it on until you hit the button again), and special functions for hazard lights, turn signals and a flashy center brake light. A little code will allow custom power window functions (working on how to do intelligent one touch controls soon) and power door locks, etc.
Anywho, it's come out pretty well so far. I have 3 assembled boards with boxes, so I'll address each one differently and validate that the traffic behaves like I expect. I will probably tweak the current downstream box design to allow 4-5 channels of analog input on those as well so that they can process some more specific data for their area. Mostly relevant for stuff like current load feedback for power windows or servo control for an HVAC box, which I'd like to look at as well.
Okay, bed time.