Skip to content

Instantly share code, notes, and snippets.

@montyanderson
Created September 15, 2017 18:58
Show Gist options
  • Save montyanderson/1931036e326ffa851fb9d4d190135729 to your computer and use it in GitHub Desktop.
Save montyanderson/1931036e326ffa851fb9d4d190135729 to your computer and use it in GitHub Desktop.
#define READY 4
#define LATCH 5
#define DATA 6
void setup() {
Serial.begin(9600);
pinMode(READY, INPUT);
pinMode(LATCH, OUTPUT);
pinMode(DATA, OUTPUT);
}
void loop() {
while(digitalRead(READY) != HIGH) {
;
}
char c = 'b';
while(true) {
for(int i = 0; i < 8; i++) {
digitalWrite(DATA, c & (1 << i));
digitalWrite(LATCH, HIGH);
delay(100);
digitalWrite(LATCH, LOW);
delay(100);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment