I am working on my first project that involves serial communication between two Arduino boards. I am using a Mega and Uno. The Mega seems to be sending and receiving correctly but the Uno, which is sending correctly, does not seem to be able to recognize the value that it is receiving from the Mega. The value from the Mega is printing on the Serial Monitor when I have the Uno connected to the USB so I am not sure what is wrong.
Can anyone see what is wrong with my code for the Uno?
test_mega.ino (1.6 KB)
test_uno.ino (1.26 KB)