Raspberry Pi Pico W LESSON 17: Buttons and Pull Up Resistors in Micropython

  Рет қаралды 9,482

Paul McWhorter

Paul McWhorter

Күн бұрын

Пікірлер: 49
@joeanderson3414
@joeanderson3414 Жыл бұрын
Mr.McWhorter is actually a true genius. Our Uni professor actually uses his videos to teach Arduino. Thank u so much Mr.McWhorter❤️
@qzorn4440
@qzorn4440 Жыл бұрын
It is always a great learning tool to look over a knowledgeable shoulder. 😎 Thank you.
@1cookgs
@1cookgs 9 ай бұрын
Thank you for all the good help. You are a gifted teacher.
@polkcountymike6274
@polkcountymike6274 Жыл бұрын
Paul, I really enjoy your classes, and I am learning a lot. I have a couple of suggestions that I hope you won't take as criticisms. First, one of the things that most impressed me about your first Arduino classes was that you insisted on commenting every line of code. I understand that you might not want to take the time to do that in these lessons, but I think it would be helpful if you just gave a quick lesson on how to do it and recommend that we add comments as we go. I always try to comment your code as I enter it into Thony and then go back and add more comments after the lesson before saving the program. Second, when you are teaching us new program concepts, you sometimes enter some code to demonstrate a concept, and then erase it and write some new code. I like to keep the programs we write in class as example or templates for future programs. If you could show the class how to toggle comments for blocks of code, we could just comment out the previous example and continue with the new example. Then we would have both versions in our saved code. Thanks for all the teaching you do. You do the best job of anyone I have found at making these concepts clear and understandable.
@Bob-zg2zf
@Bob-zg2zf Жыл бұрын
I will never be that smart and sane when I become a senior like Paul.😅
@nimbatchelor8684
@nimbatchelor8684 Жыл бұрын
Thanks for your content. You are always educational.
@ssyedyaseens
@ssyedyaseens 7 ай бұрын
I was confused about the pull up resistors part, here's a video that helped me understand it a bit better. kzbin.info/www/bejne/lWmrip2glrlqeK8&ab_channel=JulianEdgar This is my understanding of the concept, if I made a mistake feel free to post the correct explanation. 1. The "IN" pin is directly connected to a 3.3v input. 2. When the switch is not shorted (not pressed), that input 3.3v isnt grounded and so that IN would receive that voltage (as per point 1). So a value 1 on thonny. 3. When the switch is pressed, that input 3.3v is grounded thats why we see a zero on the value on thonny since that voltage isnt there anymore. Thanks for making this amazing series Mr.McWhorter! I've been looking for something like this for quite sometime.
@larryplatzek9017
@larryplatzek9017 Жыл бұрын
I think this was GREAT, just what I expect Paul Mcwhorter to do. PS/ have wife home and I will be care giver!
@scottwait3585
@scottwait3585 Жыл бұрын
Thanks Paul! Great lesson
@charlotteswift
@charlotteswift Жыл бұрын
I actually did this lesson over a year ago when I was trying to do all of Paul's Raspberry Pi lessons on a Pico. Here is the link : kzbin.info/www/bejne/qpm3eYB3e7-KnZo I've done a new version using the picozero library: kzbin.info/www/bejne/m33JoIypeMakpas
@TheTechRancher
@TheTechRancher Жыл бұрын
@paulmcwhorter what type of software are you using to record the videos? I'm still having problems with OBS Studio.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
I use wirecast, which unfortunately is an expensive program. You can get OBS to do most of what wirecast does.
@drdentin3215
@drdentin3215 Жыл бұрын
I made this more difficult than it needed to be. Just finished HW, not enough time to post.
@kamae79
@kamae79 5 күн бұрын
5:04 the drawing is upside down compared to the actual board
@paulmcwhorter
@paulmcwhorter 5 күн бұрын
Good catch . . . the pico drawing is upside down.
@JohnnyUtah269
@JohnnyUtah269 Жыл бұрын
Do we have to handle debounce logic?
@ErlankBru
@ErlankBru 2 ай бұрын
Will anyone advise please? As one learns code as a beginner, is it important to learn these sketches by heart, typing them over repeatedly (that is after every line of code is understood), to kind of build our "vocabulary"? I'm doing this, but I find that after 10 lessons I'm already forgetting how to type the earlier lessons by heart. Should I carry on with the lessons, typing them out, ect. until I reach lessons 94+ or should we repeat the earlier/earliest lessons to have them fresh in our mind? Even after revision I find that my vocabulary goes away, BUT I realize I know exactly WHERE to go back to whenever I need to check on syntax.🙂
@paulmcwhorter
@paulmcwhorter 2 ай бұрын
I think it is important to review. Go back and make sure you can write simple programs on your own, without looking at my solutions line by line. Spend some of your time reviewing old lessons as you continue to move forward with new lessons.
@johnosuchowski6569
@johnosuchowski6569 Жыл бұрын
Noticed that the pico on top has the usb lead on the right whereas on the schematic it’s on the left.
@paulmcwhorter
@paulmcwhorter Жыл бұрын
Either side will work as long as it is inline.
@rassulkuatov6160
@rassulkuatov6160 2 ай бұрын
Guys, could you please give me advice. My buttons do not work, I changed 3 breadboards, changed GPI opens, checked them. But still can't get the result as in the lesson,took button from Arduino kit, still doesn't work. Should I change pc? thank you! P.S. Thank you for the great lesson!
@bigbogeyface
@bigbogeyface Жыл бұрын
Here's my Push Button Homework: kzbin.info/www/bejne/j6fQc3qBmq5qna8 👍
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@kev67uk
@kev67uk Жыл бұрын
Thanks for another great lesson Paul. I'm jumping in quick with my homework this week, as it was fairly straightforward and I know I have a busy week ahead 🙂. Looking forward to next week's lesson. kzbin.info/www/bejne/r5uZqH-Fg9-bp9U
@davidh1187
@davidh1187 9 ай бұрын
Homework for the lesson kzbin.info/www/bejne/ipjJm5ltlrKEptk. Some switch bounce encountered of course and possibly long press toggling which I should have account for with a delay state.
@paulmcwhorter
@paulmcwhorter 9 ай бұрын
OK, you have it working, but you have done it in a way that requires a specific touch. So, you have to think, it needs to work whether you have a quick push or a long push or an in between push. Does that make sense?
@davidh1187
@davidh1187 9 ай бұрын
​@@paulmcwhorter Yes another use case option. In the real world it is interesting how many products actually work the way I have coded it (Remote control volume buttons etc) unless I am misinterpreting something.
@Wythaneye
@Wythaneye Жыл бұрын
Lesson 17 homework posted: kzbin.info/www/bejne/pnzIeIaAhrmHpas
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND! Bryan is Back in the Saddle!
@briankelly4095
@briankelly4095 Жыл бұрын
Homework is all done Paul. You can find it at kzbin.info/www/bejne/r6XJpIyGbKuAac0 Thanks again. Your assignments always make me think. Looking forward to getting into the rest of the kit. Will we be touching on pico webpages?
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@LorisHW
@LorisHW Жыл бұрын
Thanks Paul! Here is my homework: kzbin.info/www/bejne/maK3gqRubamLm7c
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@chases9870
@chases9870 Жыл бұрын
i did it in 15 minets
@arnoldschmucker9977
@arnoldschmucker9977 Жыл бұрын
After folding up like a cheap folding chair, I finally got it. kzbin.info/www/bejne/jn2kc6djaJdnn9U
@todd3c
@todd3c 11 ай бұрын
kzbin.info/www/bejne/pnjcZZp4qMidbNE Did something a little extra.... Added a white led which toggles while the button is pressed every .1 sec. Added code to toggle the RED led only once no matter how long the button is pressed. Please ignore the DHT22. (I skipped ahead to lesson 20 - DON'T tell Paul) from machine import Pin from time import sleep buttonPin = 14 myButton = Pin(buttonPin, Pin.IN, Pin.PULL_UP) rledPin = 15 # RED Led myREDLed = Pin(rledPin, Pin.OUT) wledPin = 13 # WHITE Led myWHITELed = Pin(wledPin, Pin.OUT) toggleLed = True while True: buttonstate=myButton.value() print (buttonstate) sleep(.1) if not buttonstate and toggleLed: #This will TOGGLE the RED Led one time myREDLed.toggle() #no matter how long button is pressed toggleLed = False if buttonstate: toggleLed = True if not buttonstate: # This will TOGGLE the WHITE Led every 1/10 myWHITELed.toggle() # of a second for as long as the button is pressed
@paulmcwhorter
@paulmcwhorter 11 ай бұрын
LEGEND!
@karliskide2460
@karliskide2460 Жыл бұрын
Thank you for another great lesson! Here is my homework for this one: kzbin.info/www/bejne/rWrUdn2kqNiSmac
@jameslewellen150
@jameslewellen150 Жыл бұрын
Here is my homework. kzbin.info/www/bejne/qKrYo3yJiMSVp6c
@TheTechRancher
@TheTechRancher Жыл бұрын
Homework Link: kzbin.info/www/bejne/pKvVhWCvbrSgiMk Another great video Paul
@paulmcwhorter
@paulmcwhorter Жыл бұрын
LEGEND!
@daveslack2755
@daveslack2755 10 ай бұрын
Thanks again for these lessons. Homework to toggle led with button - kzbin.info/www/bejne/hWXNf52Mj7OCgdk
@paulmcwhorter
@paulmcwhorter 10 ай бұрын
LEGEND!
@VeryUsMumblings
@VeryUsMumblings Жыл бұрын
I am Legend. I finished the homework here: kzbin.info/www/bejne/qpjYnaykjZVsgrM Great video, as ever.
Raspberry Pi Pico W: Wireless Weather Station
17:13
ExplainingComputers
Рет қаралды 298 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 14 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 15 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 30 МЛН
Pull-up and pull-down resistors explained
6:33
Blueprint IoT
Рет қаралды 11 М.
Understanding Pull Up Down Resistors
26:57
Making Stuff with Chris DeHut
Рет қаралды 3,4 М.
Pull Up/Down Resistors
6:42
0612 TV w/ NERDfirst
Рет қаралды 9 М.
Raspberry Pi Pico W LESSON 36: Control a Servo With MicroPython
36:02
Raspberry Pi Pico W LESSON 33: Display the HSV Color Wheel on an RGB LED
22:12
Every Developer Needs a Raspberry Pi
27:27
Sam Meech-Ward
Рет қаралды 1 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 14 МЛН