ARGH!

Thanks Ralph! I can't believe I missed that. Pull-up resistors is one of those things that I watch out for in all switches.

But I've been so busy learning new stuff on this circuit that I've totally forgotten what I consider to be a basic thing. I was so sure I had misunderstood something in the MCP23016 datasheet, or wired an I2C device improperly, a pull-up resistor never dawned on me.

The circuit works beautifully now.

Robert