Using Momentary Switches on the PICO

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

Making Stuff with Chris DeHut

Making Stuff with Chris DeHut

Күн бұрын

Learn how to interface Momentary Switches to the RPi Pico and learn how to make the switch behave the way you want it to! Momentary switches are VERY commonly used in many applications with microcontrollers and this video will help you understand them extensively. Covered in this video:
* What is a Momentary Switch
* That they are used for
* Datasheet Review
* Fritzing wiring diagram
* Dealing with Key bounce effectively
* How to define their behavior with FIVE program examples
SEE ASSOCIATED VIDEOS:
Raspberry Pi PICO Setup and Preparation for Programming • Raspberry Pi PICO Setu...
Using PWM on the RPi PICO microcontroller • Using PWM on the RPi P...
PICO Machine Library PIN Class • PICO Machine Library P...
Using PICO Interrupts • Using PICO Interrupts
VISIT OUR COMPANION WEBSITE -- makingstuffwit...
DOWNLOAD FILES HERE -- makingstuffwit...
SOURCED ITEMS USED IN SOME OF THE VIDEOS
25 pcs Momentary Switch assortment amzn.to/3uR6BRG
10 pcs Seven Segment LED display amzn.to/37lv21R
2 pcs Bar Graph LEDs amzn.to/3LIevno
3 pack of breadboards amzn.to/3oAkK3H
200 pc assortment of LEDs amzn.to/3JfLQVc
450 pc assortment of LEDs amzn.to/3sr1vKL
38 value / 1200 pcs resistor assortment amzn.to/3Llxq8k

Пікірлер: 33
@user-nk5vc9ot6l
@user-nk5vc9ot6l 10 ай бұрын
You deserve a bigger following Keep it up you and Paul Mcwhorter are amongst the best teachers
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 10 ай бұрын
Hi user-nk5vc9ot6l, THANK YOU VERY MUCH!!!! That is a wonderful compliment and I really appreciate it. Cheers! Chris
@Doug-Didgiridoo
@Doug-Didgiridoo 2 жыл бұрын
Thanks, I appreciate going over the basics in depth. It is worth the time taken. Well done. Your web site and download links are very good, now I can concentrate on your content, rather than having to write everything down.
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 2 жыл бұрын
Thanks fort he feedback, very much appreciated!
@duncanmarks1590
@duncanmarks1590 Жыл бұрын
hi, very happy to see white background programming editor examples these are much easier to read than the previous dark backgrounds. Yes I know when "coding" dark background is less eye strain but hard to read as screen shots. bye
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut Жыл бұрын
Hi duncanmarks1590 , The early videos had the white background for the Thonny editor. After enough complaints, I switched to the dark theme. I was not a fan of the dark theme at first, but I must admit, my eyes are far less sore after many hours of programming. Cheers Chris
@nigelworwood8530
@nigelworwood8530 10 ай бұрын
I came back for a refresher. So consider a second like. Thanks for sharing your knowledge.
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 10 ай бұрын
Hi Nigel, It is truly my pleasure to share what little I know with great people such as yourself. I sure hope it helps you with your exploration of PICO and MicroPython! Cheers! Chris
@hardeepsingh68
@hardeepsingh68 Жыл бұрын
Great contribution to the Pi-pico user community. Thanks for making immense resources available on the website. 👍
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut Жыл бұрын
Hi @hardeepsingh68 You are very welcome! Cheers! Chris
@scottellis1204
@scottellis1204 2 жыл бұрын
Absolutely great videos! Been teaching myself python/electronics by working on projects, and your videos have been succinct and incredibly informational! Looking forward to your future topics 😀
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 2 жыл бұрын
Hi Scott, Thank you very much for the comments and feedback - VERY MUCH APPRECIATED!!!!! New PICO related videos will be added to the existing ones at a rate of 1 per week until early September. Well, probably longer but that is what I have filmed and being edited and uploaded. After that will be more, probably some project videos mixed in with the informational ones. Thanks again so much for the kind words, that really helps with the motivation! Please let others know about the channel too as I really need to get the subscriber numbers up.
@jimcraig5727
@jimcraig5727 2 жыл бұрын
Also self teaching myself Micropython using a Raspberry Pi Pico I soldered up to a prototype board containing some leds, switches & soon a potentiometer. Learned a lot from your well done tutorial on Switches & looking forward to going through the remainder of your KZbins and hopefully those to come. Your effort is much appreciated.
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 2 жыл бұрын
Thank you very much for the feedback Jim. Much appreciated. I am in the planning stages for filming the next series of videos about the PICO and electronics. Looks like a broader mix of tutorials and projects.
@jimcraig5727
@jimcraig5727 2 жыл бұрын
@@MakingStuffwithChrisDeHut Looking forward to them
@SFXMadness
@SFXMadness 2 жыл бұрын
Hi there. Informative and feels complete. Appreciate the extra info and perspective you brought in, perhaps with a bit of passion transpiring there. Anyways, keep em coming. If you ever switch your tools and display to dark mode on day, I won't complain. Cheers!
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 2 жыл бұрын
Thanks for watching and thanks greatly for the feedback, much appreciated!
@StudentTrader
@StudentTrader 4 ай бұрын
Wow thank you! I learned so much!
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 4 ай бұрын
Glad to hear that you benefited from the video! Cheers! Chris
@jackjones6936
@jackjones6936 2 жыл бұрын
Great video, much appreciated! I learnt a lot and got my project working. Now I'm wanting to go to the next level and do multiple actions with a single button (Pressing for power on, holding for increasing speed/brightness and then holding again for decreasing speed/brightness, and then double pressing for a timed on/off cycle). Would you be up for doing a video on that?
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 2 жыл бұрын
Hi Jack, thanks for stopping by and the kind words! Regarding your request, I am always open to suggestions and requests and will put that request in the log book.
@colind7875
@colind7875 27 күн бұрын
That's so interesting. I need to make a 15 illuminated button work, so the last button pressed is illuminated. Could I use 15 inputs for the buttons and then use a decoder for the 15 LED's please?
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 26 күн бұрын
That may work, but hard to say without know the specific chips etc. Here is another approach... kzbin.info/www/bejne/fmWzd6imntSCg68 Cheers Chris
@colind7875
@colind7875 26 күн бұрын
I will watch, Thank you very much,
@jyvben1520
@jyvben1520 2 жыл бұрын
great example code, but sometimes the game code might be take too long to catch the button press ... probably not a problem on the ultra fast pico ... some of the printouts might have benefitted from adding a timestamp (ms) on each line, would show a scrolling action ...
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 2 жыл бұрын
Thanks for the feedback, much appreciated!
@RufftaMan
@RufftaMan Жыл бұрын
yeah, that's my problem too. I have code that takes around 0.1 seconds to run, which makes missing a button press quite possible. Was looking for ideas on how to work around this. Maybe using a trigger function and "storing" the button press until the main code catches up and acknowledges it. Not sure yet.
@commandprompt7171
@commandprompt7171 2 жыл бұрын
Hi Chris, i want to thank you very much for explaining the switches and the buttons and even the voltage on the oscilloscope, I only have 1 question. If i need to add 3 more buttons to the pico can i connect 1 side of the 3 switches in series directly to the 3V3 OUTPUT and the other side of the buttons to other GP inputs? or is there an easier way to connect multiple buttons to the pico?
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 2 жыл бұрын
That would depend on how you want them to work - Series would require all 3 switches to be on for the circuit to be on. In parallel, each switch is independent. I suspect what you want is parallel and as such. you can use the 3.3V pin to power each of the buttons. As it is hard to connect 3 wires to a single pin, you may need to run a single wire off the board, then tie that to the three wires (one for each of your switches). I hope that make sense.
@VoeViking
@VoeViking 2 жыл бұрын
Sorry, but why do you write machine.Pin(25, Machine.Pin.OUT) and not only write Pin(25, Pin.OUT) Thank you.
@MakingStuffwithChrisDeHut
@MakingStuffwithChrisDeHut 2 жыл бұрын
Hi VoeViking, It is a bad habit of sorts. Some functions within some libraries require using the library_name(dot) notation. Generally, it is not required.
@jackjones6936
@jackjones6936 2 жыл бұрын
Correct me if I'm wrong but I think if you write machine.Pin() then you're identifying the pin via the number on the pico but if you use just Pin() then you're using GPIO numbering which is not as simple due to ground pins not having a number. I don't think it matters which you use as long as you know the naming convention so that you're identifying the correct pin you want to use.
@bobcharles3029
@bobcharles3029 2 жыл бұрын
It depends on how you import machine ie import machine VS from machine import pin
Problem solved with these multimeter test leads?
6:54
Making Stuff with Chris DeHut
Рет қаралды 1,2 М.
Using PICO Interrupts
25:15
Making Stuff with Chris DeHut
Рет қаралды 18 М.
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 1 МЛН
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20
Run BOTH Cores with Threading On The PICO
33:28
Making Stuff with Chris DeHut
Рет қаралды 6 М.
How to use Timers on the RPi PICO
17:05
Making Stuff with Chris DeHut
Рет қаралды 16 М.
Hacking my garage door with the Raspberry Pi Pico W
11:50
Jeff Geerling
Рет қаралды 340 М.
PicoMiteVGA: Raspberry Pi Pico Boot-to-BASIC Microcomputer
23:58
ExplainingComputers
Рет қаралды 127 М.
Attaching any Switch or Button to Arduino Microcontrollers!
11:34
Adam Jerozolim
Рет қаралды 4 М.
Beginners Guide to I2C on the Raspberry Pi Pico (BNO055 IMU Example)
16:57
Learn Embedded Systems
Рет қаралды 74 М.
Raspberry Pi Pico: nRF24L01 over SPI
19:05
Tinker Tech Trove
Рет қаралды 29 М.