From the course: Learning Arduino: Interfacing with Hardware
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Coding 7-segment display showing numbers - Arduino Tutorial
From the course: Learning Arduino: Interfacing with Hardware
Coding 7-segment display showing numbers
- [Instructor] All right, so now since we're using the same common anode from Sigmadel AD we're going to keep the same wiring for it, and I know to use the same file that we used in a previous example. So we are going to keep the code from line 2 all the way to line 9, because we are keeping the identifying pins and also we're keeping the code for line 13 to line 18 as we are identifying the pins to be an output. Now let's start coding to show zero. To show zero, I need LED A, B, C, D, E, F to be on. So we're setting low for these LEDs. So I'm going to keep code 23 to 27 to turn off LEDs to start with and let's erase everything we had before. To just kind of start from the beginning. Alright, so usually like to add a delay before I start the next letter so I'll add a delay of one second. And I'll start coding to display zero. So for display zero, digital write and then I specify the LEDs that I want the to be on and I'm sending low. Okay, so I'm going to copy and paste the same code…
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
-
-
-
-
Overview of the 7-segment LED35s
-
(Locked)
The 7-segment LED component1m 24s
-
(Locked)
7-segment LED display types1m 42s
-
(Locked)
Checking a 7-segment LED type1m 32s
-
(Locked)
Wiring up the 7-segment LED4m 50s
-
(Locked)
Cycle through each LED directly5m 34s
-
(Locked)
Cycle through LEDs with a for loop2m 29s
-
(Locked)
Understanding the 7-segment LED truth table2m 7s
-
(Locked)
Coding 7-segment display showing numbers3m 21s
-
-
-
-