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.

The shiftOut command

The shiftOut command

- Okay, so for the command that we're using in order to code the shift register, is a shiftOut command. ShiftOut command simply shifts out bits of data one at a time, so starting from either the most significant, or the least significant. The command has the following syntax: so you start with a dataPin, clockPin, and then the bitOrder if you're doing most significant or least significant, and finally, the data. So let's go ahead and do the coding for it. Okay, so this is the shiftOut. Then we write down the dataPin, clockPin. Now in the bit order, it's either most significant or least significant. The way we did the wiring was for the most significant bit, so we go with most significant bit first, and then finally the data that we'd like to show. And in our case, we're trying to show the numbers that you see in line nine to ten. So I'm going to go ahead and write down the array name. So now since I want to show the…

Contents