Sorry, let me explain more clearly:
- I connected 2 Arduino’s to 2 serial ports on my computer so I could monitor them. The receiver was on the one board and the transmitter on the other
- I first used SoftwareSerial library to try to communicate - there was lots of noise coming through on the receiver - a stream of numbers that had no pattern
- I then use VirtualWire, and it worked perfectly - the message went from transmitter to receiver.
- After some time - maybe a 5-10 minutes, the receiver was only picking up the data from the transmitter sometimes. I tried using wire for an antenna, and also making sure the transmitter was on 5V.
- Then a short while later, I was receiving nothing
- I did not change any wiring during this time.
So I thought there could be 3 problems:
I tested the Arduino port with another sketch and it worked ok.
I can’t test the transmitter, because it needs a receiver to test it
I then thought maybe I can test the receiver using SoftwareSerial, and check whether it is still receiving lots of noise. The receiver was receiving nothing…
I can’t think how it could just stop working. I tried the same with my second receiver, and the same thing happened. After that, I tried the first receiver again (maybe it overheated and was now cool again). It was just quiet, didn’t seem to be receiving anything.
Thanks for your ideas and help.