I am using an Arduino mega to send serial data to a controller that has 7 flip dots connected to it (like the signs in railway stations). The lead bit must be 0. So to turn them all on I should send the following: 01111111
I am using the following code:
Serial.begin(9600); byte on =B01111111; Serial.write(on);
When I do this it only turns on the first flipdot so it thinks it has received: 00000001
I'm 99% sure that the controller works fine as I have had it working not on an Arduino. I have tried quite a lot of values, so here is a list of what I send and what it thinks its receiving:
Sent Received 00000001 01111111 00000010 01111101 00000011 00111111 00000100 01111100 00000101 01011111
There seems to be a patter, some of the sent and received add to 128 and some of them seem to be the inverse. Any suggestions on what is going wrong would be greatly appreciated.