Poor serial performance when sending data from RaspberryPi to Arduino

Hi Paul, thanks for taking the time to reply.

I was unaware serial required 10 bits per character, OK so that knocks the maximum frame rate down a little. The cast to Int in the switch statement was there as I didn't know switch could handle bytes, I'll take it out.

How would you suggest the receiver code waits for the 3 bytes, I wasn't sure what else it could do other than loop round waiting for data. Is that very inefficient?

As for monitoring what the receiver sends back, there is actually nothing being sent back. I stripped out all serialprint lines I had in there for debugging as I thought that might be the cause of the issue.

Cheers
Nick