I am fairly new to Arduino programming. I am trying to get my head wrapped around communicating between two Arduinos over RF connection. I have a 433MHz TX and RX. I have the transmitter plugged into an Arduino Mega with the data line attached to Digital 7. The Receiver is attached to an Arduino Uno and the data line is attached to Digital 7 as well.
The TX code has INT variable called test_count which increments every 1 second. The value of this variable is then transmitted.
The RX code also has INT variable called test_count. What I am trying to achieve is to make the test_count equal to the data received from the transmitter and then display it using the serial monitor.
The problem I am having is that the serial monitor only prints a 0 after every second. I would really appreciate if someone can help me fix this code. I would also really appreciate if someone can help me understand how I can send values of multiple variable and receive and store them correctly.
I have fixed the code now. However the result of printing the buffer through serial monitor are quite strange. The numbers being printed are quite random with zeros, 6, 248, etc. I was expecting the value of variable received from the transmitter to be printed or am I missing something basic again.
I'm making a tutorial that will help with your problem and will you let to trasmit valuables using virtualwire.Also you can trasmit more than one valuable.