[See the code several posts later].
Hi, I am completely new to Arduino, though not to programming and hardware ... I am having a problem that I think can be described in a couple of sentences and answered simply (if I'm wrong, I'll post my code):
My sketch is trying to read 2 bytes at a time from the USB to UART serial port. I am sending the two bytes using a Perlscript (under OSX Unix terminal). Unless the Perlscript closes and re-opens the serial port between writing the 2 bytes, the sketch does not see any but the first byte. I have added a 100ms delay between sending the 2 bytes.