Commit d87ae88e authored by Patrick Fenner's avatar Patrick Fenner
Browse files

added 4-digit filename test

parent 454d253f
......@@ -93,6 +93,7 @@ void setup() {
sd.initErrorHalt();
} else {
Serial.println(F("SD began"));
sd.ls(LS_R);
}
}
......@@ -129,7 +130,15 @@ void loop() {
}
bmpDraw("invader.bmp", 0, 0);
delay(10000);
delay(5000);
char filename_buffer[13];
for (int i=0; i<=255; i++) {
sprintf(filename_buffer, "%04d.bmp", i);
if (sd.exists(filename_buffer)) {
bmpDraw(filename_buffer, 0, 0);
delay(1000);
}
}
}
// This function opens a Windows Bitmap (BMP) file and
......@@ -219,6 +228,7 @@ void bmpDraw(char *filename, uint8_t x, uint8_t y) {
Serial.print(F("Row size: "));
Serial.println(rowSize);
// If bmpHeight is negative, image is in top-down order.
// This is not canon but has been observed in the wild.
if(bmpHeight < 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment