From the course: Learning Arduino: Interfacing with Hardware

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Initializing pins for the shift register

Initializing pins for the shift register - Arduino Tutorial

From the course: Learning Arduino: Interfacing with Hardware

Initializing pins for the shift register

- [Instructor] Okay so to start the coding for this part I've provided you with a starter project for this section. So go ahead and open 03_06_starter_project file from the exercise files. So, the exercise file looks like this one. So, the very first thing that we need to do, is we need to identify the three pins that we connected to the shift register. So, the very first one is constant integer, is the dataPin and we connected that to pin number eight in our Arduino board. The second one is constant int, the latchPin that lives in pin number 10. And finally, the shift clock pin, and I will name it as constant int clockPin, and that one's connected to pin 11. Okay, so the next part now, is trying to get the combination in order to show the numbers. So, this is the truth table for the common added LED that we are using. So, in order to get the binary number, you simply take each of the combination and place a zero B…

Contents