Arduino E-Paper Display Library Port

Hello everyone, I am looking to use a DFRobot E-Paper display (http://www.waveshare.com/wiki/4.3inch_e-Paper) with my Photon. It utilizes a standard Serial connection to communicate. I have added the library to Particle and created a project with all the demo files in it: https://go.particle.io/shared_apps/5992137b5bf713b3910018b0

The original library can be found here: https://github.com/Arduinolibrary/DFRobot_E_paper/raw/master/epd.zip

The library needed some modifications (change pinMode(wake_up, HIGH) to pinMode(wake_up, OUTPUT) and pinMode(reset, HIGH) to pinMode(reset, OUTPUT)) and I had to comment out the definition of the reset pin, which isn’t used anyways. Other than that I connected RX to TX and TX to RX, Wake Up to 2, and power to 3V and ground. This device is 3V compliant. The display refuses to show anything other than a blank screen, and it is tested and working on an Arduino Uno. Any help would be appreciated.

Just randomly browsing and this popped up.

I’ve been using this EPD for a while. It works very simply and reliably. You should write a function to listen to the RX after you send a command. The device offers very useful error codes. It’s reset line is Active high and the wakeup requires a posedge.

Just briefly looking at your code I couldn’t see Serial1 used which is connected to TX RX.

Hayden

Thanks for your reply. Would you be willing to provide me with one of your particle sketches that utilizes this EPD? I would just like to ensure that I can get the connection working. In regard to Serial1 - my understanding was that by importing Particle.h and calling Serial.begin() you are defaulting to Serial1, which uses the RX and TX pins. I’ll hook them up to an o scope to see what’s happening but any insight would be greatly appreciated.

No, Serial refers to the USB serial, you need to use Serial1 for the RX and TX pins.

From the docs,

Serial: This channel communicates through the USB port and when connected to a computer, will show up as a virtual COM port.

USBSerial1: Since 0.6.0 This channel communicates through the USB port and when connected to a computer, will show up as a second virtual COM port. This channel is disabled by default.

Serial1: This channel is available via the device's TX and RX pins.

Serial2: This channel is optionally available via pins 28/29 (RGB LED Blue/Green). These pins are accessible via the pads on the botton of the PCB See PCB Land Pattern. The Blue and Green current limiting resistors should be removed.

2 Likes

Thanks a ton, you just saved me hours of debugging. The display is now fully working with my Photon. For anyone interested, the working sketch is here: https://go.particle.io/shared_apps/59931543ee215477e6000d79

The 3.3V regulator on your Photon is more than sufficient to drive the display.

2 Likes

the shared apps links doesnt work anymore :disappointed_relieved: