Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Shift Register Test that will quickly turn on and off the lights
- * Zoë Purdy
- * 1/16/18
- *
- */
- const int SER = 8;
- const int LATCH = 9;
- const int CLK = 10;
- void setup()
- {
- pinMode(SER, OUTPUT);
- pinMode(LATCH, OUTPUT);
- pinMode(CLK, OUTPUT);
- digitalWrite(LATCH, LOW);
- shiftOut(SER, CLK, MSBFIRST, B11111111);
- digitalWrite(LATCH, HIGH);
- delay (200);
- digitalWrite(LATCH, LOW);
- shiftOut(SER, CLK, MSBFIRST, B00000000);
- digitalWrite(LATCH, HIGH);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement