Good day everyone
!
My partner and I are currently working on a uni project where we are using the Seeed Grove triple color e-ink 1.54" display. We tried connecting the display via the UART interface to a XIAO ESP32c3.
We do not want to do anything fancy, other than displaying a bitmap of an image on the screen. For this, we tried to use the demo code from GitHub, linked in the official documentation of the E-Ink Display.
The Problem:
Nothing we tried seems to change the display state, other than the initial screen of the display during the booting sequence. The goal is for the screen to transition to the desired black and red color map after the delay and after each iteration in the loop.
We think our wiring should be correct:
Our sketch looks like this:
#include <Arduino.h>
#if (defined(_AVR_))
#include <avr/pgmspace.h>
#else
#include <pgmspace.h>
#endif
#include <Wire.h>
const unsigned char IMAGE_BLACK[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */
0XFF, 0XFF, 0XFF..
};
const unsigned char IMAGE_RED[] PROGMEM = { /* 0X00,0X01,0XC8,0X00,0XC8,0X00, */
0XFF, 0XFF, 0XFF..
};
void serial_send_data(const uint8_t* data, uint32_t len) {
for (uint32_t i = 0; i < len; i++) {
Serial1.write(pgm_read_byte(&data[i]));
}
}
void write_image_picture() {
// Black image
for (int i = 0; i < 38; i++) {
serial_send_data(&IMAGE_BLACK[i * 76], 76);
delay(70);
}
delay(70);
// red image for (int i = 0; i < 38; i++) {
serial_send_data(&IMAGE_RED[i * 76], 76);
delay(70);
}
}
void send_begin() {
Serial1.write('a');
while (true) {
if (Serial1.available()) {
char c = Serial1.read();
Serial.print(c);
if (c == 'b') break;
}
}
}
// === Setup & Loop ===
void setup() {
Serial.begin(115200);
Serial1.begin(230400, SERIAL_8N1, 7, 6);
delay(10);
send_begin();
delay(2000);
write_image_picture();
delay(2000);
}
void loop() {
delay(10000);
send_begin();
delay(2000);
write_image_picture();
delay(2000);
}
Here is a link to the wiki of the display; there you can also find links to the example code and the hardware specifications sheet.
The example code is also linked in this repo:
Here a link to the Wiki Page of the esp:
Thank you very much in advance for your time, as we are new to this domain!
