Trouble Getting Adafruit_EPD_RK Driver Working

Hi all,
I'm brand new to the Particle ecosystem. I'm trying to port some code over from an ESP32 project built with Platformio.

I'm starting with the E-Ink featherwing display from Adafruit. I downloaded the library and loaded up some simple code from my previous project shown below.

I cannot for the life of me figure out why the display is not updating. The display is known good -- it works fine driven by my ESP32. Can anyone tell me what I'm missing here?

I'm getting no response at all from the display.

// Include Particle Device OS APIs
#include "Particle.h"
#include "Adafruit_EPD.h"
// Let Device OS manage the connection to the Particle Cloud
SYSTEM_MODE(AUTOMATIC);

// Run the application and system concurrently in separate threads
SYSTEM_THREAD(ENABLED);

// Show system, cloud connectivity, and application logs over USB
// View logs with CLI using 'particle serial monitor --follow'
SerialLogHandler logHandler(LOG_LEVEL_INFO);

#define SD_CS D2
#define SRAM_CS D3
#define EPD_CS D4
#define EPD_DC D5

#define EPD_RESET -1 // can set to -1 and share with microcontroller Reset!
#define EPD_BUSY -1  // can set to -1 to not use a pin (will wait a fixed delay)

#define COLOR1 EPD_BLACK
#define COLOR2 EPD_RED

#define DISPLAY_HEIGHT 250
#define DISPLAY_WIDTH 122

#define ICON_HEIGHT 38
#define ICON_WIDTH 45

Adafruit_SSD1608 display(250, 122, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

int light = D7;

void initializeDisplay()
{
  display.begin();
  display.setRotation(3);
  display.clearBuffer();
}

void testDrawText()
{
  display.setCursor(0, 0);
  display.setTextColor(COLOR1);
  display.setTextWrap(true);
  display.print("TESTING");
  display.display();
}

void testDrawLines()
{
  for (int16_t i = 0; i < display.width(); i += 4)
  {
    display.drawLine(0, 0, i, display.height() - 1, COLOR1);
  }

  for (int16_t i = 0; i < display.height(); i += 4)
  {
    display.drawLine(display.width() - 1, 0, 0, i, COLOR2);
  }
  display.display();
}

void clearDisplay()
{
  display.clearBuffer();
}

void setup()
{
  pinMode(light, OUTPUT);
  initializeDisplay();
  clearDisplay();
}

void loop()
{
  digitalWrite(light, 1);
  delay(500);
  digitalWrite(light, 0);
  delay(100);
  Log.info("Blink");

  clearDisplay();
  Log.info("Cleared display!");
  testDrawLines();
  delay(10 * 1000);
  clearDisplay();
  delay(1000);
}```

Oops! After I posted, I know see you did use the .begin() command. Sorry! :blush:
This might help get you going. The code is not using the library to initialize the display. I added a statement below:

void setup()
{
  pinMode(light, OUTPUT);
  display.begin();// added this line
  initializeDisplay();
  clearDisplay();
}

I have not reviewed anything else. There is an example in the library called:

FeatherWingTest.cpp

where you will see this .begin() call in setup() and other commands.strong text

Hi @robc thanks for the quick response! I made sure to begin the display.

I have tried the FeatherWingTest.cpp and changed the initialization routine to match my driver and size:

Adafruit_SSD1608 display(250, 122, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

Still no luck...

I'm confused why you're setting up the Adafruit_SSD1608 object. While there are some EPDs that use a SSD1608 controller, I'm pretty sure the Adafruit 2.13" EPD that's 250x122 should use the Adafruit_EPD display object, not the Adafruit_SSD1608.

Hey @rickkas7, great question. I'm definitely not confident that's the correct way to initialize my display object.

I'm using the FeatherWing e-ink board and it seems to have been updated to use the SSD1608 driver fairly recently..

I just tried changing

Adafruit_SSD1608 display(250, 122, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

To:

Adafruit_EPD display(250, 122, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

But I get the following build error:

error: cannot declare variable 'display' to be of abstract type 'Adafruit_EPD'
   31 | Adafruit_EPD display(250, 122, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

Did you have something different in mind?

Now that I look more closely there are two different displays, one with the SSD1608 and one with the IL0373 but I only tested the library with the IL0373 so I'm not sure if there are any special considerations with using it with a SSD1608 display. Your initialization line does look correct.

OH I think I see the issue. A quote from Adafruit's change log:

  • As of April 27, 2020 we're selling a version with SSD1680 chipset, instead of the SSD1675 chipset. Firmware code will need to be updated as they are not code compatible.

I misread the driver, my display uses SSD1680 NOT SSD1608. It seems that maybe this library does not yet support SSD1680 (which I assume is newer).

That makes sense! I ported the Adafruit_EPD library on 2019-12-15 so that would have been before the change. The changes are probably in the upstream library but it might be a few days before I can merge the upstream changes into the Adafruit_EPD_RK library.

2 Likes

Hey @rickkas7 I think I was able to get the SSD1680 driver from Adafruit ported to your library. It seems to be working with my hardware. I opened a PR, let me know what I can help do to get it merged in.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.