I need to readout all the char from the RX buffer after a CR has been sent. So send CR, wait for 1sec, dump the char. I can see how to do steps 1 and 3 but how do I set a 1 sec delay to wait for the buffer to fill up?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-09-19
Hi Stefan,
Can you give me an example of using the single shot timer. I can't get it to work for love or money.
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-09-19
Hi Stefan,
I must be missing something fundamental. I have two functions One starts a timeout timer(3 sec) every 10 seconds to send some data. The second function is called when some data is received. To process the data and stop the timeout timer. It would appear the stop timer command in the second function does not stop the time started in the first function. The timer is defined in the main body of the script.
What am I missing?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-09-19
All good fix my own problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need to readout all the char from the RX buffer after a CR has been sent. So send CR, wait for 1sec, dump the char. I can see how to do steps 1 and 3 but how do I set a 1 sec delay to wait for the buffer to fill up?
You can use sleep or a timer (depends on your script).
Sleep:
Timer:
Hi Stefan,
Can you give me an example of using the single shot timer. I can't get it to work for love or money.
Thanks in advance.
Hi Stefan,
I must be missing something fundamental. I have two functions One starts a timeout timer(3 sec) every 10 seconds to send some data. The second function is called when some data is received. To process the data and stop the timeout timer. It would appear the stop timer command in the second function does not stop the time started in the first function. The timer is defined in the main body of the script.
What am I missing?
All good fix my own problem.
:-)