Sending a single byte over serial
Hi all. I'm trying to send a single byte over serial to an Arduino.
The Arduino has a sketch that will send the byte 'a' if it receives a byte equal to 144 in decimal, and will otherwise send the exact data it received back to max.
I have tried using a message containing 144 going into the serial object; however the Arduino returns 49 52 52. This shows that the Arduino is receiving three bytes, one for each character in the number 144.
I have also tried sending the message through an itoa block and then into the serial block, but the console reports that serial doesn't understand " □ " (a white square corresponding to an un-displayable character).
I have even tried number blocks of various bases (2, 10, 16) going into the serial block, but get the same result as my first attempt.
Is there anything I can do to have max send a single byte over serial that can't be represented by a character?
send 144 to atoi, then to serial object.
Arduino shoul read 144, if You have trouble on arduino side
have a look at parseint