Some thoughts on "data transfer between the threads". Instead of the lock/wait, a shared array could be used. core1 pushes new entries while main loop checks if array size > 0 and acts accordingly (removing first element from array when done). Also, a shared object would make sense, containing a value element and a "lockstate" element (boolean value indicating if data is beeing changed or not). Did not try that, but it came up to my mind.
Chris wears an Amiga shirt... gets an automatic thumbs up from me. But in all seriousness, this is great info and a great video. Very well put together/presented.
Hi RandomBitzz, thanks for the kind words, very much appreciated! Regarding the Amiga, I still have my Amiga 1000 that has a memory expansion, monitor, and external disk drive. I threw away the mouse and keyboard some years back thinking it was some old PC hardware. I wake up every morning now and kick myself in the private parts for doing that! Cheers Chris
@@MakingStuffwithChrisDeHut I kick myself for not picking up a Commodore SX-64 when I had the chance. I was really big into the 64 and 128. My younger brother was the Amiga enthusiast in our household, but I helped him install a few hardware upgrades every now and then. I would have picked one up myself but I found all my money going into two other competing interests. One being a 1968 Camaro that I was restoring and the other being all the girls that would ride along in it 🙂
@@RandomBitzzz LOL!!!! The reason I wear Pontiac T-Shirts is I had a 1968 Firebird that I had a love affair with. I really miss that car AND all the money I spent on it!!!! Cheers! Chris
Nice video, thanks for taking the time to put this together. You used the term Semaphore to refer to the thread synchronization mechanism, really this should be called a Mutex (or Lock, or Resource). Semaphores serve a slightly different purpose. Anyway, good stuff!
I like your videos, but one thing could you zoom in while you are in your code window, it is hard to see it. I have to get really close to my screen to make out what you are describing. Just a thought. I am learning Micro Python right now; it is different than C++ "Arduino IDE". Thank you.
Hi Eric, Several other viewers have been letting me know the font size is too small as well. I will certainly try to enlarge the font so that it is more readable. Thanks for letting me know about this. Cheers! Chris
Interesting, another unused part (in my case) is pio and pio memory, wondering if it can be used to exchange data between cores and/or be used as semaphore.
Your curiosity matches mine Ben. I have been wanting to spend some time on the PIO side of the PICO, perhaps later this year I can start exploring there. Cheers! Chris
I enjoyed this. Connected a few dots for me. Thank you!
Awesome, happy to hear it helped you.
Cheers!
Chris
Good info and tips. I am working on when would doing a thread be best versus using interrupts. Any thoughts? Thanks for video!
Some thoughts on "data transfer between the threads". Instead of the lock/wait, a shared array could be used. core1 pushes new entries while main loop checks if array size > 0 and acts accordingly (removing first element from array when done). Also, a shared object would make sense, containing a value element and a "lockstate" element (boolean value indicating if data is beeing changed or not). Did not try that, but it came up to my mind.
I like that idea too! It would be interesting to try that when I have time. Thanks for sharing that idea Tomek.
Cheers!
Chris
Chris wears an Amiga shirt... gets an automatic thumbs up from me.
But in all seriousness, this is great info and a great video. Very well put together/presented.
Hi RandomBitzz, thanks for the kind words, very much appreciated!
Regarding the Amiga, I still have my Amiga 1000 that has a memory expansion, monitor, and external disk drive. I threw away the mouse and keyboard some years back thinking it was some old PC hardware. I wake up every morning now and kick myself in the private parts for doing that!
Cheers
Chris
@@MakingStuffwithChrisDeHut I kick myself for not picking up a Commodore SX-64 when I had the chance. I was really big into the 64 and 128.
My younger brother was the Amiga enthusiast in our household, but I helped him install a few hardware upgrades every now and then. I would have picked one up myself but I found all my money going into two other competing interests. One being a 1968 Camaro that I was restoring and the other being all the girls that would ride along in it 🙂
@@RandomBitzzz LOL!!!! The reason I wear Pontiac T-Shirts is I had a 1968 Firebird that I had a love affair with. I really miss that car AND all the money I spent on it!!!!
Cheers!
Chris
Nice video, thanks for taking the time to put this together. You used the term Semaphore to refer to the thread synchronization mechanism, really this should be called a Mutex (or Lock, or Resource). Semaphores serve a slightly different purpose. Anyway, good stuff!
HI @waymamma
Thanks for sharing the info, much appreciated.
Chris
I like your videos, but one thing could you zoom in while you are in your code window, it is hard to see it. I have to get really close to my screen to make out what you are describing. Just a thought. I am learning Micro Python right now; it is different than C++ "Arduino IDE". Thank you.
Hi Eric,
Several other viewers have been letting me know the font size is too small as well. I will certainly try to enlarge the font so that it is more readable. Thanks for letting me know about this.
Cheers!
Chris
@@MakingStuffwithChrisDeHut Yea, perhaps make the font larger in Thonny
Interesting, another unused part (in my case) is pio and pio memory, wondering if it can be used to exchange data between cores and/or be used as semaphore.
Your curiosity matches mine Ben. I have been wanting to spend some time on the PIO side of the PICO, perhaps later this year I can start exploring there.
Cheers!
Chris
Well presented. Thanks for that. Subscribed.
Good morning EBF-oc3ke,
I am happy to hear you enjoyed the presentation, thanks for watching and subscribing!
Cheers!
Chris
much appreciated 🙏
Hi OmidAtaollahi,
My pleasure, glad you liked the video!
Cheers!
Chris
Hey, please tell someone DIY guys that Python works within 1 process which means it cannot utilize 2 cores until you can run 2 apps simultaneously.
Or perhaps learn C and get the equivalent of 10s of cores in processing power....
Then it wouldn't be in MicroPython ;-)
Cheers!
Chris