"Thank you! My brother converted it to a PDF and I am reading it.
It is quite the Magnum Opus.
I have one question (so far) about that TOF delay before the read: how is putting the 2s of delay before the read any different, functionally, from adding 2s to the timeout after the read?"
This 2 second TOF delay before the Read Command allows sufficient time for the Met4A because the P9 command contains a request for a pressure reading as well as other transmitter data and the WeatherStation takes a pressure sample.
Taking a pressure sample takes a small amount of time to comlpete. Without that time delay for the read statement I was only getting partial data back from the Met4A WeatherStation or sometimes nothing back at all.
It was a fun troubleshooting session haha. I could make all sorts of requests successfully but any time I wanted barometric pressure data (there are other commands besides the P9 command that I tried) the data never came through and I believe if I remember correctly the Read instruction actually error'd out sometimes. I thought about why and then it dawned on me that taking a sample probably meant it needed more time. So after adding a TOF delay I was successfully able to get data every time.
The delay after the Read that is part of the Timeout is probably something that Ken can explain better. From my understanding of how it is working, I needed that timeout in order to reset the Command and Read so that they would go out and repeat the process to acquire new data. When I removed that timeout logic my Command and Read only happened once and then the .DN bits were set and never cleared. I think this is because the ASCII clear buffer was no longer getting cleared.
Why there is a timer there for the timeout I think has to do with the timeout in particular but I can't explain why at this point. I know I am missing something regarding more functionality of the timeout but I have honestly never used a timeout before and my experience in this area of serial communication is still pretty limited. Ken added that in the first copy that was posted and it was exactly what I needed to continue polling data after it was successfully received.
Last edited: