PROBLEM SOLVED!
As expected it was a hardware problem: Loose nut behind the keyboard (me).
It was an indexing issue (0 vs. 1). We had the switch connected to DIO ch 1 (according to the numbers on the digital breakout board) whereas the code needs to use 0 to access that channel. Why couldn't they have numbered the breakout board starting at 0?
I could have SWORN that we had run a test to check for this yesterday, but apparently not.
I was 99.9% certain it had to be a programmer problem and (sheepish grin) I once again proved myself right.
Thanks for all the suggestions.
