Skip to content

Instantly share code, notes, and snippets.

@boxysean
Created October 8, 2013 13:22
Show Gist options
  • Save boxysean/6884552 to your computer and use it in GitHub Desktop.
Save boxysean/6884552 to your computer and use it in GitHub Desktop.
Trying to make an Arduino blink sketch for the Universal LED Driver
int clockPin = 2;
int dataPin = 3;
void setup() {
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(13, OUTPUT);
}
void loop() {
//digitalWrite(clockPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 16);
//delay(2);
//digitalWrite(clockPin, HIGH);
digitalWrite(13, HIGH);
delay(1000);
// digitalWrite(clockPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, 0);
//delay(2);
//digitalWrite(clockPin, HIGH);
digitalWrite(13, LOW);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment