Thanks for both suggestion, the task I am trying to accomplish if I receive valid data while I have the switch on my output comes on, but when the switch is off, if no valid data is received turn the output off. I have the squelch circuit installed and when I adjust it up the code does what I want, but if I just break the squelch then it stays at serin2 listening for the qualifier. I did try the flag idea but with the output from the rf module toggling serin2 serpinin just stays there waiting. Here is the link to the datasheet if anyone might be interested:
http://linxtechnologies.com/Document...Data_Guide.pdf
Thanks again
Bookmarks