Shop OBEX P1 Docs P2 Docs Learn Events
Transmit Acknowledgement — Parallax Forums

Transmit Acknowledgement

LightfootLightfoot Posts: 228
edited 2010-06-04 01:04 in Propeller 1
I have a simple program that sends a byte of data from an XBEE transmitter to a receiver. First the PC sends the letter 'A' to a propeller. Once the prop receives an 'A', the transmitter XBEE sends the letter A to the receiver. Once the receiver receives the 'A', a '#' character is sent back to the transmitter. If the transmitter receives the '#' character in 30ms, a P is sent to the PC, standing for pass. If not, an F, is transmitted back.

I am having a problem where the programs sometimes work and sometimes do not. In other words the '#' char does not always make it back to the transmitter. I have a feeling it is a latency issue. I have tried delays is multiple places, but nothing works. What is going on?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • LightfootLightfoot Posts: 228
    edited 2010-06-04 01:04
    OK, I seemed to have axed the problem by adding a while loop to wait for the pound sign. If it does not arrive in one second, the receiver assumes it has lost contact with the transmitter. Why does it work with the while loop but not the other way? It must have been receiving the pound sign all along because if it were another character, my transmitter app will just sit there and hang.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.