Hallo ,
ich habe mir Inkpalet6 gekauft und versuche die mit Arduino zu programmieren.
https://inkplate.io/getting-started/
kann mir jemand sagen wie soll ich loop machen, das die Bilder sich jeder 10 sec abwechseln
Ich lade auf sd Karte die Bilder ein und möchte das der die abruft und von den ersten bis den letzten jeder 10 sec wechselt.
Das ist der Code die ich verwende und wie gehts weiter ?
#include "Inkplate.h"
#include "SdFat.h"
Inkplate display(INKPLATE_1BIT);
SdFile file; //Create SdFile object used for accessing files on SD card
void setup() {
display.begin(); //Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); //Clear frame buffer of display
display.display(); //Put clear image on display
//Init SD card. Display if SD card is init propery or not.
if (display.sdCardInit()) {
display.println("SD Card OK! Reading image...");
display.partialUpdate();
//If card is properly init, try to load image and display it on e-paper at position X=0, Y=0
if(!display.drawBitmapFromSD("image4.bmp", 0, 0)) {
//If is something failed (wrong filename or wrong bitmap format), write error message on the screen.
//REMEMBER! You can only use Windows Bitmap file with color depth of 1 or 24 bits with no compression!
display.println("Image open error");
display.display();
delay(5000);
}
display.display();
} else {
//If SD card init not success, display error on screen and stop the program (using infinite loop)
display.println("SD Card error!");
display.partialUpdate();
}
delay(5000);
//Now try to load image using SdFat library class (for more advanced users) and display image on epaper.
if(file.open("image8.bmp", O_RDONLY)) {
display.drawBitmapFromSD(&file, 0, 0);
display.display();
}
}
void loop() {
}