Thank you very much for suggesting asyncio. As bad as AI is, I still do find it to be really good at explaining things. I had trouble grasping the concepts of scheduling the sharing of a single microprocessor looking at libraries. The interactive capabilities of being able to ask a question and cross examine the response, backed by deep patience, helped me understand the usefulness of asyncio....
If I was tackling the code to read some temperature sensors, display the results on a touch screen ili9341 and run a small web server etc. then the use of the following micropython libraries will produce very fine results.
For the ili9341 touch screen:
https://github.com/peterhinch/micropython-touch
For the web server (use the async server code):
https://microdot.readthedocs.io/en/latest/
For the SHT45 temp sensors
https://github.com/jposada202020/MicroPython_SHT4X.git
Copilot will not help you with any of the above and, if you actually do want to produce a good and robust program, then stop your dilettante ways, man up and get stuck in. Ok, my maybe rather harsh comment on finding I wasted a few moments of my time with copilot rubbish, ugg.
...
Thanks for all of your help. I was way behind for all of the discussion, but it was a good tussle to be bystander for. I had no sense of what was going on behind the scenes of MicroPython. I has always viewed it as a complete project that has basically fully stabilized. I had no idea that concurrent 2 core functionality wasn't really worked out in MPy.
I have been scratching my head how a lock could prevent a race condition so long as both cores could attempt to lock at the same time. I had trouble seeing how a lock would not itself require a lock, and so on. I had planned to use the FIFO buffer to save me from having to deal with race conditions. I did not realize that race conditions could also occur on so many shared resources too.
Statistics: Posted by JoeBobby — Fri Dec 06, 2024 11:53 am