making the leds light up while receiving data
hi,
I am receiving data from·the parallax·Receiver (#27981) using the following code given in the datasheet i am only able to make the LEDS blink when receiving data.
However, I want to make 1 LED to light out when not recieving data and the other 1 LED light up when receiving data. 1 LED on at a time. I am not able to do it. Is there any command or codes I can use to detect whether my reciever is recieving data or not ?
I am receiving data from·the parallax·Receiver (#27981) using the following code given in the datasheet i am only able to make the LEDS blink when receiving data.
DO LOW 0 SERIN 7, 16468, [noparse][[/noparse]WAIT("!"), x.HIGHBYTE, x.LOWBYTE, y.HIGHBYTE, y.LOWBYTE] HIGH 0 DEBUG ? x DEBUG ? y LOOP
However, I want to make 1 LED to light out when not recieving data and the other 1 LED light up when receiving data. 1 LED on at a time. I am not able to do it. Is there any command or codes I can use to detect whether my reciever is recieving data or not ?
Comments
The problem with this approach is you're not really indicating when exactly you're recieving data -- more like "checking for data", and "Data recieved". But usually that's enough for most people.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
What about putting in an error-check after the SERIN-line, something you will probably need anyway later, and if you are receiving correct data then light another LED for half a second or so before going back to the loop.
This way the other LED will not actually lit when receiving is going on but lit half a second every time received true information.