Page : | [ 1 ] | [ 2 ] | [ 3 ] | [ 4 ] | [ 5 ] | [ 6 ] |
Just a couple pics of it running (before adding the dots for a colon) :
And after adding the dots for a colon:
Some test code to count from 0 to 99
int LATCH_PIN = 8;
int CLOCK_PIN = 12;
int DATA_PIN = 11;
// 0 1 2 3 4 5 6 7 8 9
int digits[] = {B0000, B1000, B0100, B1100, B0010, B1010, B0110, B1110, B0001, B1001};
void setup(){
pinMode(LATCH_PIN, OUTPUT);
pinMode(CLOCK_PIN, OUTPUT);
pinMode(DATA_PIN, OUTPUT);
}
void loop(){
for (int i = 0; i < 10; i++){
for (int j = 0; j < 10; j++){
digitalWrite(LATCH_PIN, LOW);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, (digits[i] << 4) + digits[j]);
digitalWrite(LATCH_PIN, HIGH);
delay(100);
}
}
}
(Page 6 of 6) | ||