nerdDoro semaphore lock
Wow! Fun! I implemented semaphore locks on the read of the Sensirion and the RTC. What a difference it has made in the stability of the LCD display and the consistency of the XML output.
Check out the before and after shots of the ndXml a c# application that reads the XML data once a minute and persists to an SQL db.
Note the caught exceptions in this screenshot before I implemented the semaphore locks
![ndXmlExceptionCapture.PNG](https://forums.parallax.com/uploads/attachments/55589/82398.png)
And after. Wish I would have picked up on the clue that once I moved the LCD update functions into their own cog nerdDoro became unstable. Looking much better now!
![ndXmlAfterLocksCapture.PNG](https://forums.parallax.com/uploads/attachments/55589/82399.png)
This is over 1.5 hours of reads for about 100 records without an error. It's never gone more than say maybe 15 reads previously without an error.
I had never written any cognew or lockset code before. Now that it's done I can say fun, but wow I sure spent a lot of time wondering. So maybe I will be able to document this and enter the contest.
I've updated the github repository https://github.com/jhalbrecht/nerdDoro and cleaned up a lot of code and documented the source code.
c ya... - jeffa
Check out the before and after shots of the ndXml a c# application that reads the XML data once a minute and persists to an SQL db.
Note the caught exceptions in this screenshot before I implemented the semaphore locks
![ndXmlExceptionCapture.PNG](https://forums.parallax.com/uploads/attachments/55589/82398.png)
And after. Wish I would have picked up on the clue that once I moved the LCD update functions into their own cog nerdDoro became unstable. Looking much better now!
![ndXmlAfterLocksCapture.PNG](https://forums.parallax.com/uploads/attachments/55589/82399.png)
This is over 1.5 hours of reads for about 100 records without an error. It's never gone more than say maybe 15 reads previously without an error.
I had never written any cognew or lockset code before. Now that it's done I can say fun, but wow I sure spent a lot of time wondering. So maybe I will be able to document this and enter the contest.
I've updated the github repository https://github.com/jhalbrecht/nerdDoro and cleaned up a lot of code and documented the source code.
c ya... - jeffa