Dear forum,
I'm using a 28X2 to send a number to a second 28X2, using the well-known DORJI transmitter/receiver. Extremely straightforward. It's just a test set-up to check the reliability of the transmission. That works OK, no problems here.
BUT; I want to check the reliability of the transmission as follows: if the first 28X2 sends a number and the second one does NOT receive anything, it should be able to let me know (message to OLED) and then go back to serin to check again if there is a message.
If I use the standard serin command, in this case serin, b.2,n600_4,("PX"), b1, the picaxe will of course wait forever if it does not receive anything.
Here's the problem: I expected that including a timeout in the the command as follows: [1000,aap],serin, b.2,n600_4,("PX"), b1 would do the follwing:
1) wait for 1 second if anything is received from the transmitting 28X2
2) if a message arrives go to the next program line
3) if NO message is received within that second, go to aap: and then do what it has to do under aap:, display "missed transmission" on the OLED.
For some reason this does not work: the 28X2 still "hangs"; it still keeps waiting forever for a message from the sender.
Before bothering you with the details of the program, I'd like to know: do I misinterpret the function of the timeout-command?
I've extensively searched the forum, but did not find the answer I was looking for.
Even a short hint from the forum members would already be helpful.
Thanks in advance,
Ronald
I'm using a 28X2 to send a number to a second 28X2, using the well-known DORJI transmitter/receiver. Extremely straightforward. It's just a test set-up to check the reliability of the transmission. That works OK, no problems here.
BUT; I want to check the reliability of the transmission as follows: if the first 28X2 sends a number and the second one does NOT receive anything, it should be able to let me know (message to OLED) and then go back to serin to check again if there is a message.
If I use the standard serin command, in this case serin, b.2,n600_4,("PX"), b1, the picaxe will of course wait forever if it does not receive anything.
Here's the problem: I expected that including a timeout in the the command as follows: [1000,aap],serin, b.2,n600_4,("PX"), b1 would do the follwing:
1) wait for 1 second if anything is received from the transmitting 28X2
2) if a message arrives go to the next program line
3) if NO message is received within that second, go to aap: and then do what it has to do under aap:, display "missed transmission" on the OLED.
For some reason this does not work: the 28X2 still "hangs"; it still keeps waiting forever for a message from the sender.
Before bothering you with the details of the program, I'd like to know: do I misinterpret the function of the timeout-command?
I've extensively searched the forum, but did not find the answer I was looking for.
Even a short hint from the forum members would already be helpful.
Thanks in advance,
Ronald