I just purchased a Waveshare 4.2" e-paper display with the hopes of using it with an Arduino Mega. I hooked it up to the Uno first and it works, although i have a lot to learn. Then I hooked it up to the same pins on a Mega clone and while the code uploads, it doesn't run. Has anyone already figured out how to run this display with a Mega? I am creating a control panel display for a hops dryer with multiple temperature, humidity and fan variables and I think this will be much nicer than using 4-line lcd displays. This is the one I bought. https://www.waveshare.com/product/displays/e-paper/4.2inch-e-paper-module.htm
I figured it out. First, you have to change the wiring a bit because the SPI pins are different on the Mega.
UNO
MOSI = D11
SCK = D13
SS = D10
MEGA
MOSI = 51
SCK = 52
SS = 53
Next, edit epdif.h to change the CS_PIN assignment. I modified mine to have both UNO and MEGA sections. It appears that MISO isn't used.
// UNO Pin definition
/*
#define RST_PIN 8
#define DC_PIN 9
#define CS_PIN 10
#define BUSY_PIN 7
*/
// MEGA Pin definition
#define RST_PIN 8
#define DC_PIN 9
#define CS_PIN 53
#define BUSY_PIN 7
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.