#include "LedControl.h"
#include "binary.h"
LedControl lc = LedControl(12, 11, 10, 1);
unsigned long delaytime = 1000;
//Song
byte song[] = { B00000000, B00000000, B00000000, B00000000,
B00000000, B00000000, B00000000, B00000000,
B11000011, B00000000, B11000011, B00000000,
B11000011, B00000000, B11000011, B00000000,
B11000011, B00000000, B11000011, B00000000,
B11000011, B00000000, B11000011, B00000000,
B00000000, B00000000, B00000000, B00000000,
B00000000, B00000000, B00000000, B00000000 };
void setup() {
// put your setup code here, to run once:
lc.shutdown(0, false);
// Set brightness to a medium value
lc.setIntensity(0, 100);
// Clear the display
lc.clearDisplay(0);
Serial.begin(9600);
}
int songPos = 0;
int songSpeed = 500;
bool debounce = 1;
void loop() {
if (millis()%songSpeed < 10 && debounce){
debounce = 0;
lc.clearDisplay(0);
for (int i = 0; i < 8; i++) {
lc.setColumn(0, 7-i, song[songPos + i]);
}
Serial.print(songPos);
Serial.print(" ");
Serial.print(song[songPos]);
songPos++;
}
if (millis()%songSpeed > 10){
debounce = 1;
}
}
byte arrow() {
}
void playSong() {
}