abs_4,8,14_way_togglepair.zip

This came up because of one of the aggravating things about using arduino (and I can only assume other scenarios where signals are being sent continuously) is that when you switch 2 toggles, say going from 1-on/2-off to 1-off/2-on you pass thru the intermediate 1-off/2-off state which Will in fact send a signal and register a result.

It got me thinking about what the two toggles are doing: Changing states.

So if you break it down, there are 8 state changes for two buttons (which is exemplified in "abs_8-way_toggle-eventmodel_sv") with each change being its own state, exs. 0>1=1, 1>0=2, etc.

One nice thing about that, is if you do it that way you can "trap" the pesky multiple state scenarios by adding a timer, which is evidenced in the "abs_14-way_toggle-eventmodel" so that if the change is made fast enough (i.e. below the threshold) it sends only 1 signal for 0>1>3=8, 1>0>2=12, etc. While if done slowly, 0>1=1, 1>3=4.

Why I like this, is that it means for any two toggles, there actually 14 states of being not just 4.


Hope you can find a use for it.

I REALLY enjoyed thinking about this. And it bore much technical fruit/ideas besides just this patch as outgrowths from making it.

Peace and goodwill toward all,
Scott