Raspberry Pi LESSON 35: Monitoring User Input from Keypad Using Threading

preview_player
Показать описание
Announcing the Most Awesome Raspberry Pi Lessons of All Times! This time we RUMBLE!

In this class series, we will be using the most excellent Sunfounder Ultimate Raspberry Pi kit, available here: (Affiliate Link)

In this video lesson I will show you how to build a portable Raspberry Pi system which can monitor the keypad for input in the background using threading, while doing a main function in the foreground. We show how to use a nonblocking thread to constantly monitor the keypad for input without blocking the main program functions.

If you want to grab those cool little straight jumper wires I am using to keep my breadboard builds neat and clean you can snag a box of them here:

If you guys are interested in the oscilloscope I am using, you can pick one up here (affiliate link):

You guys get your hardware ordered so you can follow along at home!

You will also need a Raspberry Pi. I suggest the Raspberry Pi 4. If you do not already have one, this is the most suitable gear I could find:

The Raspberry Pi's are sort of pricy right now, so you can look on ebay or elsewhere to see if there are any deals. You will need a SD card. If you do not already have one, this is a good one:

I like using a wireless keyboard and mouse to have fewer wires. You can certainly use your USB keyboard and mouse, but if you want a nice wireless one, this one works on the pi. We demonstrate this by using a button switch to control a LED.

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:

#THREADING
#KEYPAD
#RASPBERRYPI
Рекомендации по теме
Комментарии
Автор

One of the top YouTube lecturers and I've watched a lot. This channel should have millions of subscribers.

alanabela
Автор

still having fun, Paul.... getting REALLY exciting now... and practical....

davidschnider
Автор

Extraordinary lesson sir... Extremely excited for the destination of this project. From India.

pralaymajumdar
Автор

I admire the complexity and ingenuity of the system you have developed for portability of raspberry pi with LCD and keypad. Your lessons are unrivaled!

There is also a simple way to achieve some of the objectives with fewer programming skills: With the pi400, the full keyboard is always available. It is easily operated off a battery pack. VNC can be used on smartphone to visualize the pi console as a wireless alternative to the LCD or an attached monitor. The pi400 is only a little bulkier than the pi4 + keypad and LCD.

floridian
Автор

This is another most-excellent lesson from the best teacher on the internet. I was delayed in completing my homework version because I found that my super 8 GB Pi has a defective GPIO pin. After numerous hours of troubleshooting I was able to work around the problem by adding an eternal pull-down resistor or using a different pin. Of course, I am now worried whether I will find other problems with my Pi. At least I can now move on to the next lessons.

cbrombaugh
Автор

Thanks Paul for another great lesson. Can't wait to see where we go next.

keithlohmeyer
Автор

Thank you for another great lesson, Sir! Thank you, your lessons are not wasted time for me and that is exactly what I want! 👍

dzeykop
Автор

We can't thank you enough ! best tutorials ever ! my god bless you. Are you planning on doing an NVIDIA jetbot/jetRacer playlist ?

zahrahafidabenslimane
Автор

Thank you for all of your great effort, Paul!

DrDave
Автор

It looks like I am crashing and burning on another assignment, Paul. But I did connect the keypad to the breakout board(BCM) and split up the breadboard into 5v and 3.3 volts, but cannot seem to add another threading function to run the PIR. Been working on it all week. I’m looking forward to Thursday.

DrDave
Автор

I have a suggestion for your upcoming videos. As it turns out I'm trying to design a simple alarm system right now.
I'm in the early days of Designing trying to decide what parts to use excetera.
so I'm thinking of using a Raspberry Pi for the brains of my operation.
So I've watched nearly all of your lessons. and I'm definitely learning things along the way.
But one of the things I need the Raspberry Pi to do is watch two inputs to make a decision.
For example if I want to arm the system. I need the relay from the RFID tag and inputs from the
sensing components, motion sensor, door sensors Etc. If both inputs are present arm will fail.
but if RFID tag input is low and sensors are high then arm is okay. there are a couple of other
scenarios where I need to watch two inputs. but I hope this gives you an idea of what I'm up to.
If you could cover watching two inputs to make a decision I would greatly appreciate that.

terrym
Автор

Thanks Paul. My big goofy fingers with no feeling in them, is 80% of my problem with this exercise.0

stephenlightkep