Raspberry Pi Pico W LESSON 66: Create Your Own Libraries in Micropython
Вставка
- Опубліковано 5 жов 2024
- 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:
/ paulmcwhorter
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.
amzn.to/3ubMRs1
In this video, I will show you how to do object oriented programming in micropython using classes and methods. I will show you how to create your own libraries from functions, classes and methods you develop. This helps you to seamlessly reuse useful code you develop
[Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. ]
#raspberrypipicow
#micropython
#libraries
A great video for creating libraries. Love your detailed explanations. Your content always makes perfect sense. I wish all content providers did such a wonderful job explaining the details. Anytime i need to understand complex instructions, i search for your content. Thanks Paul!
Glad you like them!
Thanks Paul, I love your work. And I use many of your ideas in my STEM class.
Great to hear!
Cool to right a library rather than remembering where you used it so you could copy the code. Thanks Paul!
I just rewatched this lesson and goofed with it. WOW. Stuff like time.sleep make sense. When you gave lessons on the wifi stuff and hid the passwords. I was baffled. I think this is what was going on. YATHZEE! thanks for all the lessons. Also there wasn't a servo library for the Pico W? To me that seems lazy on the Raspberry developers. Like releasing an iPhone that can't text message.
I am going to hate missing today, I have a doctors appointment. I will have to watch this afternoon. Have a Great Class!
Hope to see you back in class next week.
This will give us a GOOD tool to use in other projects! Thank You Paul!
ty for your hard work Paul, never stop :)
Thank you very much for this video
great video, thanks for all msr!!
Thanks Paul! Looking forward to next week's lesson...
Thank you Paul!
Hello Paul,
Great guide. I love details like this about the micro-accelerometers.
Back to Micropython + PicoW.
You import libraries inside the class so that the class will have everything it needs to do the job.
My concern about PicoW's RAM is that if I run a project with more than one class, each class will import the same library.
I know the libraries are stored in flash, but could you share your observations on how this approach will affect RAM and RAM fragmentation.
Thank you for clearing this up for me!
As others have said, this lesson helps clarify some things.
Great content, Paul! Thank you!!
Glad you liked it!
Thank you!
Thank you because you made me understand oop easily
useful as ever
"without all this nonsense ..." Would that be in the lesson where we learnt how to write that nonsense?😁 Great info as always. THANKS - not thanks.py ... see I'm learning
Great video! Quick question regarding 5:53. Let's say I need to power my servo with 6v. I connect brown and red to +6V, orange to pico, brown to pico, and I power pico from USB.
Is there any possibility, that this external 6v will damage my pico and my computer in case of anything bad happens with the servo? If yes, how to prevent this?
Thanks
Thanks, really appreciate the support!
M.r Paul, thank you for all of your nice tutorials...
I have also a question. how can I import something like datetime module into thonny environment and finally use it in raspberry pi pico w?
Thank you
Thank you for the great session.
I have one question. I want to use the newly created lib also in other projects. What is the best way to do it. I could use "softlink", but I think, this is not the best way. Do you have any idea?
I dont understand the question. For a new project, just load the library into the code for the new program.
@@paulmcwhorter Sorry, for don't being clear and thank you for your quick reply.
Of course, I can copy the library code file to the new/second project. But normally you add also new features (e.g. rotate45degreesCW), improvements or error corrections to the library file . Then I have to copy the library file between different projects again and again.
Is it not the goal of the library file, to have the code only on one place?
I also have a micro python 🗿
Do you play with your small SNAKE?