Also irgendwie will da grad gar nichts klappen.
Hier ist der Beispielcode von dem Shield:
#include "EPD.h"
#include "GUI_Paint.h"
#include "EPD_SDCard.h"
void setup() {
DEBUG("7.5inch e-Paper B and C demo\r\n");
DEV_Module_Init();
EPD_7IN5BC_Init();
EPD_7IN5BC_Clear();
DEV_Delay_ms(300);
#if 0
/*show sd card pic*/
//1.Initialize the SD card
SDCard_Init();
//2.Create a new image cache named IMAGE_BW and fill it with white
//Draw black picture
DEBUG("IMAGE_BW\n");
Paint_NewImage(IMAGE_BW, EPD_7IN5BC_WIDTH, EPD_7IN5BC_HEIGHT, IMAGE_ROTATE_0, IMAGE_COLOR_INVERTED);
Paint_Clear(WHITE);
//3.Read BMP pictures into RAM
SDCard_ReadBMP("7in5b-b.bmp", 0, 0);
//Draw red picture
DEBUG("IMAGE_BWR\n");
Paint_NewImage(IMAGE_BWR, EPD_7IN5BC_WIDTH, EPD_7IN5BC_HEIGHT, IMAGE_ROTATE_0, IMAGE_COLOR_INVERTED);
Paint_Clear(WHITE);
SDCard_ReadBMP("7in5b-r.bmp", 0, 0);
//4.Refresh the picture in RAM to e-Paper
EPD_7IN5BC_Display();
DEV_Delay_ms(2000);
#endif
#if 1
//1.Create a new image cache named IMAGE_BW and fill it with white
//Draw black picture
Paint_NewImage(IMAGE_BW, EPD_7IN5BC_WIDTH, EPD_7IN5BC_HEIGHT, IMAGE_ROTATE_0, IMAGE_COLOR_POSITIVE);
Paint_Clear(WHITE);
//2.Drawing on the image
Paint_DrawPoint(25, 50, BLACK, DOT_PIXEL_1X1, DOT_STYLE_DFT);
Paint_DrawPoint(25, 70, BLACK, DOT_PIXEL_2X2, DOT_STYLE_DFT);
Paint_DrawPoint(25, 90, BLACK, DOT_PIXEL_3X3, DOT_STYLE_DFT);
Paint_DrawPoint(25, 110, BLACK, DOT_PIXEL_4X4, DOT_STYLE_DFT);
Paint_DrawLine(50, 50, 150, 150, BLACK, LINE_STYLE_SOLID, DOT_PIXEL_1X1);
Paint_DrawLine(150, 50, 50, 150, BLACK, LINE_STYLE_SOLID, DOT_PIXEL_1X1);
Paint_DrawLine(100, 200, 100, 300, BLACK, LINE_STYLE_DOTTED, DOT_PIXEL_1X1);
Paint_DrawLine(50, 250, 150, 250, BLACK, LINE_STYLE_DOTTED, DOT_PIXEL_1X1);
//Draw red picture
Paint_NewImage(IMAGE_BWR, EPD_7IN5BC_WIDTH, EPD_7IN5BC_HEIGHT, IMAGE_ROTATE_0, IMAGE_COLOR_POSITIVE);
Paint_Clear(WHITE);
Paint_DrawRectangle(50, 50, 150, 150, RED, DRAW_FILL_EMPTY, DOT_PIXEL_1X1);
Paint_DrawRectangle(200, 50, 300, 150, RED, DRAW_FILL_FULL, DOT_PIXEL_1X1);
Paint_DrawCircle(100, 250, 50, RED, DRAW_FILL_EMPTY, DOT_PIXEL_1X1);
Paint_DrawCircle(250, 250, 50, RED, DRAW_FILL_FULL, DOT_PIXEL_1X1);
Paint_DrawString_EN(10, 310, "hello world", &Font24, WHITE, RED);
Paint_DrawString_EN(10, 335, "Waveshare Electronics", &Font24, RED, WHITE);
Paint_DrawNum(10, 360, 123456789, &Font24, RED, WHITE);
//3.Refresh the picture in RAM to e-Paper
EPD_7IN5BC_Display();
#endif
DEV_Delay_ms(4000);
EPD_7IN5BC_Clear();
EPD_7IN5BC_Sleep();
DEV_Module_Exit();
}
void loop() {
}
Wenn ich den ausführe, bekomme ich im seriellen Monitor nur umgedrehte Fragezeichen und manchmal auch andere Zeichen angezeigt.
Hier ist der Demo-Code vom Display:
/**
* @filename : epd7in5-demo.ino
* @brief : 7.5inch e-paper display demo
* @author : Yehui from Waveshare
*
* Copyright (C) Waveshare August 25 2017
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documnetation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <SPI.h>
#include "epd7in5b.h"
#include "imagedata.h"
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Epd epd;
if (epd.Init() != 0) {
Serial.print("e-Paper init failed");
return;
}
epd.DisplayFrame(IMAGE_DATA);
}
void loop() {
// put your main code here, to run repeatedly:
}
Wenn ich den versuche, auszuführen, bekomme ich die Meldung, dass der Sketch zu groß ist und 199% des Programmspeicherplatzes belegt.
Bin grad echt am Verzweifeln und weiß nicht, warum keiner der 2 Demo-Codes klappt.
Könnte mir u. U. jemand weiterhelfen?
Danke schon mal und liebe Grüße