From the course: Learning Arduino: Interfacing with Hardware
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Optional review: IF statement - Arduino Tutorial
From the course: Learning Arduino: Interfacing with Hardware
Optional review: IF statement
- [Instructor] So if you are familiar with the if statement you can skip this video, and go to the next one, but if you want to refresh your memory about what an if statement is I'm gonna go briefly, and explain what it is. The most type of constructor command is the if statement. The if statement checks for a condition, and executes the proceeding statement, or set of statements, if the condition is true. Or simply skips the statement to the next line if that condition is not true. The condition is a Boolean type. So it's either true or false. Here's a simple example of using an if statement to check a value if it's greater than hundred. So whenever the value is greater than 100 we have a digitalWrite to a certain pin to be on. In the if statement it simply checks a condition, and then executes the code. There's no increments in the if statement. If the if statement you only have one option of whether or not to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Introduction to the keypad interface2m 1s
-
Wiring up the keypad1m 57s
-
(Locked)
Optional review: IF statement1m 28s
-
(Locked)
Optional review: The switch...case statement1m 40s
-
(Locked)
Understanding two-dimensional arrays1m 58s
-
(Locked)
Setup the keypad library2m 10s
-
(Locked)
HelloKeypad4m 41s
-
(Locked)
Using the keypad with LEDs5m 6s
-
(Locked)
Combine the keypad and 7-segment LED5m 47s
-
(Locked)
Combine them all: LCD + keypad + LED4m 44s
-
(Locked)
-