Raspberry Pi Pico W LESSON 71: Allow Thread to Complete Task Before Termination

preview_player
Показать описание
You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

In this class we will be using the Sunfounder Raspberry Pi Pico W Keppler Kit. It will make things a lot easier if we are working on identical hardware. the link below is to amazon, and is for the identical hardware I will be using in this entire class.

In this video, I will show you how to use both cores on the Raspberry Pi Pico W with threading. I show how threading can be used to use both Pi Pico Cores. I will demonstrate this with a an example where a servo is controlled by a push button toggle switch. I will show different ways to terminate the thread running on the second core gracefully. I show how you can allow the present work on the thread to finish smoothly, and then the thread terminates. This has to be done carefully or the pico can lock up and require you to remove power and power up again.

#raspberrypipicow
#micropython
#dualcore
Рекомендации по теме
Комментарии
Автор

This is a good lesson and easily understood and thus gives all another tool to use!

larryplatzek
Автор

Great video Paul! I could not tackle this lessons homework, as I had homework for my university class to do, but those are very subtle methods to cleanly terminate the program. The while loop is so simple....I didn't even think it was possible lol. Thanks

shawnlowe
Автор

Good lesson. I failed the homework, but I did figure out where in the program I needed to insert some type of code. With this failure, I am motivated to started looking at the library codes to lead about pass and baton before I get it spoon fed to me. Thank you. I am learning, I am retaining knowledge and I am more motivated with each lesson.

craigflorin
Автор

Now I understand where my program was crashing. And ... with a bit of time will have both cores operating and stopping cleanly. Thanks

nigelworwood
Автор

Thanks Paul! I just knew you had another way of releasing the thread which I had not seen before. I was trying delays and now I know why it is unpredictable and not practical/efficient... : (
In any case, taking this class is valuable and I'm looking forward to next week.

edSabio
Автор

Thanks Paul .. Love the direction we are going in .

justmc
Автор

Please come up with a tutorial series on F28379D delfino launchpad by texas instruments.

princekumar
Автор

Thanks for another great lesson. Question: What if you wanted the (Servo) thread to stop immediately and terminate the thread on the kybd interrupt (I'm thinking along the lines of an "Emergency Stop" button)?

leeg.
Автор

Paul, I have had my programing Pico W for a few days working fine . Then we had a storm and lost power and when I reconnected power. I had to reset the PICO W. It is still running in Thonny, not set as main.py without any battery backup other than the computer. Is there some way to stop the cores with a power loss?

larryb