Join Zahraa Khalil for an in-depth discussion in this video Optional review: Understanding "for" loops, part of Learning Arduino: Interfacing with Hardware.
- [Instructor] In our LCD example we are going to use…a for loop.…So, in case it has been a while since you used…a for loop, I'm going to go through that format…in order to refresh your memory about it.…So for loop starts with for and we have initialization.…And the initialization is basically,…where do we start the for loop and then,…we have the condition, and in the condition we specify…how many times we want the for loop to get executed.…
And then finally, the way we do the increments.…And then we add whatever the code we want…inside the two brackets.…So lets take an example where we use a simple for loop,…so initialization, I'm going to use integer value…of counter, and remember in initialization…I need to specify where I'm starting…so in our example I'm going to start from zero.…So the initial value is zero.…
So now according to how many times you want the loop…to execute, you change the condition accordingly.…So for example, if I want the counter to execute 10 times…and in the condition I specify that the counter…
- 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.