Hi,
I've been trying to use this transmitter and receiver pair with the nano 18:
http://www.sparkfun.com/commerce/produc ... ts_id=8945 http://www.sparkfun.com/commerce/produc ... ts_id=8948But so far I can't seem to get the right data back. The interval which the receiver receives stuff is correct most of the time (about once a second, which is how often I have the transmitter transmitting; every now and then there is a little noise outside of that, but not too much). So I think it's kind of working. If I unplug the transmitter, for instance, the receiver stops receiving anything. I plug the transmitter back in and the receiver starts spitting out data again. However, the data being received seems relatively random.
I tried implementing it using a simple check-sum byte attached to the end of the message and used that to see if the data was valid and ignoring everything else that wasn't validating with the checksum, but that just resulted in it never receiving a valid message So I went back to the drawing board just to see if I could get something that looks correct sometimes. Any tips here would be much appreciated.
Transmitter Code (the data line on the transmitter is hooked to pin 4):
Code:
MSG VAR BYTE
Initialize:
MSG = 0;
main:
SEROUT p4, I1200, [DEC MSG];
MSG = MSG + 1;
Pause 1000;
if(MSG > 10) then
MSG = 0;
endif
goto main
Receiver code (the data line on the receiver is also hooked to pin 4, but obviously a different nano):
Code:
MSG VAR BYTE
Initialize:
MSG = 0;
main:
SERIN p4, I1200, [DEC MSG];
if(MSG > 0) then
SEROUT s_out, I1200, ["MSG: ", DEC MSG, 10,13];
endif
MSG = 0;
goto main