Join Zahraa Khalil for an in-depth discussion in this video Displaying random numbers and scrolling, part of Learning Arduino: Interfacing with Hardware.
- [Instructor] Alright, so I've covered arrays…and I've covered a for loop.…So let's try and have some fun…in trying to implement a for loop…where we generate a random number…and try to display that in the lcd.…So I want you to go ahead…and open the file 0108 lcd starter project.…And in the starter project,…I've kinda included things that we've covered…in the previous example.…So in line four,…we initialize the pins…and line six is the lcd function.…So let's start by declaring an array type integer…that has 27 values.…
So int and I'll name it as a random number array…and it takes up to 27 values.…So I've chose 27…because it's a number of the character…that we can see in each line…of the lcd type that we're using.…Alright so we've initialized the array…so let's go and start coding.…So the very first thing that I wanna to specify…is where I wanna show the numbers.…Do I wanna show them in the first line or the second line?…So I'll use the first one for simplicity.…
Alright, so for the for loop…I'll have an int value i starting from zero.…
- 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.