Hardware Reference
In-Depth Information
Figure 7-4: Eight LED shift register circuit diagram
Now, using your understanding of how shift registers work, and your under-
standing of the shiftOut() function, you can use the code in Listing 7-1 to write
the alternating LED pattern to the attached LEDs.
Listing 7-1: Alternating LED Pattern on a Shift Register—alternate.ino
const int SER =8; //Serial output to shift register
const int LATCH =9; //Shift register latch pin
const int CLK =10; //Shift register clock pin
void setup()
Search WWH ::




Custom Search