Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Jung Min Yean
- * Learning How to Use a Shift Register
- * 04/29/2019
- */
- const int Data = 8; // The output
- const int Latch = 9;
- const int Clock = 10; // Goes around the Shift Register
- void setup()
- {
- pinMode(Data, OUTPUT);
- pinMode(Latch, OUTPUT);
- pinMode(Clock, OUTPUT);
- digitalWrite(Latch, LOW);
- shiftOut(Data, Clock, MSBFIRST, B11111111); // B means Binary - 1 is on and 0 is off
- digitalWrite(Latch, HIGH);
- delay(200);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement