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

Coding 7-segment display showing numbers - Arduino Tutorial

From the course: Learning Arduino: Interfacing with Hardware

Start my 1-month free trial

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…

Contents