Created
September 15, 2017 18:58
-
-
Save montyanderson/1931036e326ffa851fb9d4d190135729 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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