Raspberry Pi LESSON 33: Creating a Python Class and Library for Reading a Keypad

  Рет қаралды 6,450

Paul McWhorter

Paul McWhorter

Күн бұрын

Пікірлер: 60
@tntragan
@tntragan Жыл бұрын
Most excellent lesson. I needed the reminder on how to make the classes and methods.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Excellent!
@daveCotterill
@daveCotterill Жыл бұрын
Another great Lesson. I'm really enjoying learning how these pieces of code, classes, methods and functions etc all interact with each other. Scrips of code are starting to make more sense to me now. Thank-you very much.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Great to hear!
@LorenBurdette
@LorenBurdette Жыл бұрын
I started on this series when I bought the kit and have never used python before this. I really appreciate the way you go into and demonstrate and explain everything (even not cutting your mistakes). When going through the lessons on ADC, dht, and LCD I got curious about the setups for those libraries and really got a lot out of this lesson. Fantastic! Thank you.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Great to hear!
@martinlewis645
@martinlewis645 Жыл бұрын
Great lesson. I had to go back to the old Python classes to review classes and methods.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Excellent!
@keithlohmeyer
@keithlohmeyer 2 жыл бұрын
Another great lesson this week. No homework so just stopped by to thank Paul for his commitment to teaching tech. Hard to believe that less than 2 years ago I had not written a single line of Python. Please keep up the good work!
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
Thanks, Keith
@andrewnorburn
@andrewnorburn Жыл бұрын
really great lesson on the keypad. This lesson really showed that I need to go back and look a methods and classes again😀
@ArjanvanderMeij
@ArjanvanderMeij 4 ай бұрын
This lesson has been really helpful! Thanks a lot!
@opalprestonshirley1700
@opalprestonshirley1700 2 жыл бұрын
You are the miracle man Paul. I've gotten behind a bit, love this lesson. Thanks for all your hard work. God Bless you and your family.
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
Welcome back, Opal. Had not heard from you in a while, we were worried.
@scottwoods3413
@scottwoods3413 7 ай бұрын
Another great lesson, you are shaping my future and wanted to let you know this , keep up with the videos; i'm doing the homeworks, however i have failed to record them and send them to share. BLESSINGS!
@paulmcwhorter
@paulmcwhorter 7 ай бұрын
You can do it!
@saad7267
@saad7267 2 жыл бұрын
i literally cannot thank you enough sir, i have a competition next week where i have to code the program for an autonomous boat, and your arduino tutorials have been literally my knight in shining armor i dont what i would have done if not for you. you are such an amazing teacher it boggles my mind, wish i had encountered more teachers like you over the years. thank you and good health Mr. Paul
@keithlohmeyer
@keithlohmeyer 2 жыл бұрын
This one sounds fun. Can't wait!
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
This is a fun one. The keypad is just 16 pushbutton switches, which means it is easy to read a key with what we already know, but takes some thought to make a useful algorithm for really reading input from it.
@OZtwo
@OZtwo Жыл бұрын
Yes, the last lesson was simply YET I used a function and not a class. So this video was very helpful in understanding classes in Python! Thank you!
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Excellent!
@michielverheyen1348
@michielverheyen1348 15 күн бұрын
I am legend! I like it when your solution is different from mine, so I'm still learning something new even though I did do the homework. Using the class and creating the library was super interesting. Thanks!
@paulmcwhorter
@paulmcwhorter 14 күн бұрын
Great to hear!
@jonathanlanders9406
@jonathanlanders9406 Жыл бұрын
I am legend! I did go the easy route and just use a function, but I enjoyed watching the video after. The video gives a really great review on python classes (which I have not done in a while). One improvement on the code that I found helpful for debugging was to have the program print a '*' every time a button was pressed. This made it easier to see if the program was working right. This video was helpful as I am working on a portable microscope for some amateur ecology studies. I plan on using one of these cheap keypads for prototype versions of the microscope. Great video as always!
@cbrombaugh
@cbrombaugh 2 жыл бұрын
Thanks for another most-excellent lesson Paul. I did the homework using a Python function, but I don't think I could have figured out all the selfie-class stuff. I look forward to more lessons that make use of the SunFounder devices. God bless you for all the time and effort you devote these lessons.
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
Great job!
@stephenlightkep1621
@stephenlightkep1621 Жыл бұрын
Thanks Paul! That was really cool. I have to look up your class and library tutorials because things are clicking.
@davidschnider1297
@davidschnider1297 Жыл бұрын
thanks, Paul....going to visit and take your earlier Python Tutorials .. where you introduce Threads, Functions, Methods and Classes.... yes...still having FUN.... learning...
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Fantastic!
@smitt76
@smitt76 Жыл бұрын
Thanks for explaining what a library is at a more fundamental level. I haven’t really understood what these things we’ve been importing are.
@djbroake9810
@djbroake9810 2 жыл бұрын
Awesome as always thank you.
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
My pleasure!
@TheUnofficialMaker
@TheUnofficialMaker Жыл бұрын
Great stuff!
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Glad you enjoyed it
@billgregg
@billgregg Жыл бұрын
Thanks for the great lesson! This was my first foray into Functions, Class, Methods, Objects, and Libraries. There is so much for me yet to learn here...! You mentioned a previous lecture about these things if one wanted to learn more. I went to your website to try to find and view it. No luck, also don't see a link in description. I have also noticed that you don't have a lesson listing for this series like you do for the Fusion360 lessons(which will hopefully be my next project). I wonder what else is not clearly listed, because I think your teaching style is great, and I would like to take more of your online classes. Again, thanks! I appreciate you and all the hard work you put into your lessons.
@alanabela1900
@alanabela1900 2 жыл бұрын
I made a code that stores 5 characters. If more characters are pressed the first character of the string is deleted. When the D button is pressed, the code compares it to a password string. If the password is correct it will print a string keyword and the stored characters are deleted. If the D key is pressed when the password is wrong it will print "wrong password". I did not put this in a method tough.
@peterwadham7965
@peterwadham7965 Жыл бұрын
I folded like a cheap ...........This was my first foray into Functions, Class, Methods, Objects, and Libraries.
@DrDave327
@DrDave327 2 жыл бұрын
I have been reviewing past lessons on functions, but can't quite figure out how to execute this with a function using a keypad and an LCD screen.
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
Watch upcoming lessons
@brucemilyko8549
@brucemilyko8549 11 ай бұрын
I am legend. I made 2 functions one to get a string of characters. The second to get a single keypress. The first function needs the character to end the input, and return the string. It calls the second function that takes no input and returns the key pressed.
@charlotteswift
@charlotteswift 2 жыл бұрын
Great lesson. I had forgotten that you could put default values in the class init which you can then overrule. FYI You can avoid that long line (that everyone hated) by pressing return after every comma in the line (apart from within the inner '[ ]'s) and it will align itself nicely and still work. Small gripe, your Top Tech address hid some of the output. When I looked at the code a second time, something didn't look right. My Pi 4 is still out of action so I converted your code to run on my pico. I may have made a mistake but I think your cheap Walmart lawn chair has collapsed. If you put the main code into a while loop, it will print the string and then carrying on printing an empty string until you stop the program. I believe that you should have put ' noPress=True' and 'noPressOld=True' in the init rather than in readKeypad. Perhaps I am mistaken. I may have made a mistake in converting your code for the pico.
@e4ent23
@e4ent23 2 жыл бұрын
Please add a lecture on Ros installing and using in raspberry pi
@wilsonlittle4833
@wilsonlittle4833 Жыл бұрын
Another great learning opportunity. Thank You. However, I had very little foundation for creating a "Class?" and really could have got more from the lesson. Somewhere you mentioned that you had presented this before. However, I've done each Raspberry Pi lesson (Arduino too), and I don't recall where this was covered. Is there another series that I would benefit from taking? p.s.: In the end I was successful in creating the library that used my prior keyboard program .
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Look in my python playlist and I have a really good video on functions, methods, and classes. Well worth your time to watch that one.
@ctlancearrowlarson8237
@ctlancearrowlarson8237 2 жыл бұрын
I have a raspberry Pi 4 and I can’t get my audio to work. I have plugged computer speakers in the audio jack and no sound. Is there something I need to buy hardware, program software, coding etc. Has anyone had this problem and how was it solved? Would appreciate input on this.
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
pi has weak audio signal, might need some simple amp to drive speakers. Try earbuds and see if it works. Also, must have right plug type. Might also try bluetooth for an easier solution
@keyboardlearning7552
@keyboardlearning7552 Жыл бұрын
I have a Raspberry Pi 3b. I take the HDMI to my monitor, and take the Audio from the monitor socket. That works fine, too.
@ctlancearrowlarson8237
@ctlancearrowlarson8237 Жыл бұрын
Thanks for both responses. I bought a new monitor that had HDMI and I also at the terminal ran sudo raspi-config then system options, s2 Audio, then selected headphones. Works fine now.
@charlotteswift
@charlotteswift 2 жыл бұрын
Here are my solutions to lessons 31 & 32 - kzbin.info/www/bejne/jnTJdIihYq-to8k
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
Nice work
@davidschnider1297
@davidschnider1297 Жыл бұрын
wow... thanks Paul.... interesting - and valuable lesson... but.. a little of a s t r e t c h for me - at this point - .. headed back to your Python Series .. to come up to speed.. with Classes, Methods etc ..
@danrichardson3203
@danrichardson3203 2 жыл бұрын
Thank you. Very helpful, but there is no such thing as a silly ca video.
@saad7267
@saad7267 2 жыл бұрын
sir - follow up, i do really need some help about some of the parts of my code, because now my teammate actually built the robot, and once we are testing, we are facing alot of issues, its barely functional. is there anyway to contact u or anything please id appreciate it so much
@paulmcwhorter
@paulmcwhorter 2 жыл бұрын
I have 300,000 subscribers . . . how could I possibly provide individual help? Think . . . I am providing educational videos, I can not do the project for you.
@saad7267
@saad7267 2 жыл бұрын
@@paulmcwhorter oh sorry sir i didnt mean do the project for me, but yea i totally understand thank you very much regardless
@MikhailEschatologist
@MikhailEschatologist Жыл бұрын
I'll look at your code if you like. Do you still need help?
Raspberry Pi LESSON 39: Remotely Run Your Security Project Using Putty
22:00
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 13 МЛН
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 20 МЛН
Getting Started with LIDAR
47:27
DroneBot Workshop
Рет қаралды 1,4 МЛН
Pico W Episode 1: Setting Up the Raspberry Pi Pico W
12:48
Lori Pfahler
Рет қаралды 16 М.
Raspberry Pi LESSON 11: Understanding and Using a RGB LED
25:53
Paul McWhorter
Рет қаралды 11 М.
YOU can Learn the ESP32 in 15 Minutes:  Hello World!
22:52
Dave's Garage
Рет қаралды 333 М.
Raspberry Pi LESSON 25: Using an LCD1602 LCD Display with I2C
29:12
Paul McWhorter
Рет қаралды 14 М.
Raspberry Pi 5 Operating Systems
16:00
ExplainingComputers
Рет қаралды 148 М.
Raspberry Pi LESSON 19: Simple Control of Servo From Raspberry Pi
27:14
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН