Join Zahraa Khalil for an in-depth discussion in this video Using the keypad with LEDs, part of Learning Arduino: Interfacing with Hardware.
- [Instructor] All right, so now, we've got…the keypad working the software.…Let's continue programming our case…where we have three LEDs.…So, what we want to do is we want to program the software…that when we press one, the red LED turns on,…when we press two, the blue LED turns on,…and when we press three, the last one,…the yellow LED turns on and zero turns off everything.…So, in the code I'm going to go scroll up…and identify the LEDs first.…So, I'm going to write that down.…
So, if there are constant int,…the red LED is connected to pin nine.…Then blue LED is connected to 10.…And finally, the yellow one is connected to 11.…All right, so now the next step is in the void setup.…I need to identify the pins as outputs.…
So, red,…and to copy and paste the code and just change the pin.…All right.…So now, what I want, whenever we press…on the keypad is whenever we have a value,…and that's already initialized in the line 32,…if we have a value in the key…then something needs to happen.…
So, I'm going to use the switch case in this example.…
- Interfacing with an LCD screen
- Wiring and coding the LCD interface
- Displaying random numbers on the LCD
- Interfacing with a seven-segment LED component
- Cycling through LEDs
- Using a shift register to interface with a seven-segment LED
- Interfacing with a keypad
- Combining the LCD, keypad, and LED
Skill Level Intermediate
The devices used38s
1. Interface with an LCD
2. Interface with a 7-Segment LED Directly
3. Interface with a 7-Segment LED Using a Shift Register
4. Interface with a Keypad
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.