I am writing a program to emulate a LCD driver chip (PCF8576) in a piece of equipment where I need to replace an unobtainable LCD display.
I have wire.h set up and the code in place to decode chip commands and load the segment data to an array. That all works, and I can take that data and drive a new LCD just fine.
My problem is that the onReceive handler only triggers once. To get it to be armed and trigger again I need to press the reset button on the Uno board. I put code in to pulse an output pin and can verify with a scope that the onReceive only runs once.
When I just began the coding last week the handler would trigger each time the equipment would write to this particular I2C address, and I can tell the equipment is operating correctly since an Arduino reset will then result in the onReceive event triggering again.
Does anyone have any clue what's happening here? I tried commenting out most of my code but it still won't trigger on each receive. Obviously there's something subtle I changed that I'm missing, but what?