Hello fellow Arduinoers
I am trying to create a clock with an Arduino and an e-Paper display. My issue is, that the display only outputs garbled noise instead of the images I want it to display: see 
My setup is like this:
- Arduino Pro Mini 3,3V
- Waveshare 1,54" BW e-Paper (https://www.waveshare.com/wiki/1.54inch_e-Paper_Module)
- Waveshare EPD Library V2 (e-Paper/Arduino/epd1in54_V2 at master · waveshare/e-Paper · GitHub)
I have transformed the pictures (they look like this
) to byte arrays using image2cpp:
https://javl.github.io/image2cpp/
This is my code:
#include <SPI.h>
#include "epd1in54_V2.h"
#include "epdpaint.h"
#include <stdio.h>
#include "numbers.h";
Epd epd;
unsigned char image[1024];
Paint paint(image, 0, 0);
#define COLORED 0
#define UNCOLORED 1
unsigned long cur_time = millis();
void setup() {
Serial.begin(115200);
Serial.println("e-Paper init and clear");
epd.LDirInit();
epd.Clear();
/*
paint.SetWidth(200);
paint.SetHeight(24);
paint.Clear(UNCOLORED);
paint.DrawStringAt(0, 0, "Clock", &Font24, COLORED);
epd.SetFrameMemory(paint.GetImage(), 0, 0, paint.GetWidth(), paint.GetHeight());
epd.DisplayFrame();
*/
Serial.println("e-Paper show pic");
epd.HDirInit();
epd.Display(NUMBER_0);
//Serial.println("e-Paper goto sleep");
//epd.HDirInit();
//epd.Clear();
//epd.Sleep();
}
void loop() {
/*
cur_time = millis();
paint.SetWidth(200);
paint.SetHeight(24);
paint.Clear(UNCOLORED);
paint.DrawStringAt(0, 0, cur_time, &Font24, COLORED);
Serial.print(F("printing time: "));
Serial.print(cur_time);
Serial.print(F(" image of "));
Serial.print(paint.GetWidth());
Serial.print(F(" x "));
Serial.print(paint.GetHeight());
Serial.print(F(" at 0 50 "));
epd.SetFrameMemory(paint.GetImage(), 0, 50, paint.GetWidth(), paint.GetHeight());
epd.DisplayPartFrame();
*/
delay(10000);
}
and this is the image byte array:
// 'number_0', 32x32px
const unsigned char NUMBER_0 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x7f, 0xff,
0xff, 0xe0, 0x1f, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0x87, 0xc3, 0xff, 0xff, 0x8f, 0xc3, 0xff,
0xff, 0x1f, 0xf1, 0xff, 0xff, 0x1f, 0xf1, 0xff, 0xfe, 0x1f, 0xf0, 0xff, 0xfe, 0x1f, 0xf0, 0xff,
0x7e, 0x3f, 0xf0, 0xff, 0x7e, 0x3f, 0xf8, 0xfe, 0x7e, 0x3f, 0xf8, 0xfe, 0x7e, 0x3f, 0xf8, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x7c, 0x3f, 0xf8, 0xfe, 0x7c, 0x3f, 0xf8, 0xfe, 0x7c, 0x3f, 0xf8, 0xfe,
0xfe, 0x3f, 0xf8, 0xfe, 0xfe, 0x3f, 0xf0, 0xff, 0xfe, 0x1f, 0xf0, 0xff, 0xfe, 0x1f, 0xf1, 0xff,
0xff, 0x1f, 0xf1, 0xff, 0xff, 0x0f, 0xe1, 0xff, 0xff, 0x8f, 0xc3, 0xff, 0xff, 0x83, 0xc3, 0xff,
0xff, 0xc0, 0x07, 0xff, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
Can anyone help me out here???
Thanks and all the best,
Chris