rickkas7 / Adafruit_EPD_RK

Particle port of the Adafruit EPD (e-paper, e-ink) display library
MIT License
2 stars 2 forks source link

adafruit flexible 2.13'' epd not working #1

Open waggykitty opened 5 years ago

waggykitty commented 5 years ago

I'm trying to use the Adafruit flexible 2.13'' epd on the particle xenon with this library and Adafruit_GFX_RX library but the screen doesn't display the text. It flickers when I use the display method but it doesn't display the text or lines that I want it to. I was wondering if anyone might be able to help? attached is my .ino file. Xenon_screen_test.zip

jasonthenderson commented 5 years ago

I am having a similar problem, I've got a Boron and am using the 2.13 monochrome Featherwing and it isn't working for me. Some weird patterns show up, but the text never appears. @waggykitty did you ever get this to work for you? I just used the sample code off of the featherwingtest from @rickkas7 as well as modified code from the Adafruit site.

rickkas7 commented 4 years ago

Sorry, I apparently lost a bunch of Github notification emails. I updated the 2.3.0 of Adafruit_EPD. IT was 1.3.0. This may help.

karlg100 commented 4 years ago

I'm having similar issues as well, even with 2.3.0. Using the 1.54" mono EPD on a Xenon.

https://www.adafruit.com/product/4196

using the Adafruit_EPD example, got some screen refreshes, and odd lines. But using the even simpler examples, just refreshes black->white->black->white->black and nothing else happens.

Looks like there was report of a similar issue back in Jan on the upstream, but appears that was fixed and I assume that was pulled in with the 2.3.0 update?

karlg100 commented 4 years ago

I'm actually going to open new issue since it's a different display.

jasonthenderson commented 4 years ago

Hey Karl, that is the same behavior I’m seeing with my Boron and the 2.9 + breakout, even with the latest update that Rick pushed.

On Tue, Dec 31, 2019 at 3:16 PM Karl G notifications@github.com wrote:

I'm actually going to open new issue since it's a different display.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rickkas7/Adafruit_EPD_RK/issues/1?email_source=notifications&email_token=ABVTMG4HZ6K7GVUVUSYO2UTQ3PACZA5CNFSM4H4GBSOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH4XXYA#issuecomment-569998304, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVTMGY6AS2LPJZWSHYR4STQ3PACZANCNFSM4H4GBSOA .

karlg100 commented 4 years ago

sounds good. I've forked it and going to pull the Adafruit_EPD upstream, and see if I can find the issue.

karlg100 commented 4 years ago

so based on my first pass observations, it appears part of our problem is the SPI interface on the mesh products.

looking at the SPI output on an scope, I think we're running too hi freq. also, the default now for the particle firmware is mode 3, which mode 0 I think is what the EPD is expecting.

I can at least now change the fillScreen color. see if this works for you.

void setup(void) {
  display.begin(true);
  SPI.begin();
//  SPI.begin(SPI_MODE_MASTER);
//  SPI.setBitOrder(MSBFIRST);
  SPI.setClockDividerReference(SPI_CLK_ARDUINO);
  SPI.setDataMode(SPI_MODE0);

  Particle.publish("Stat", "Initialized");
}

void loop() {
  display.clearBuffer();
  display.fillScreen(EPD_WHITE);

  // still doesn't draw anything
  display.drawPixel(display.width()/2, display.height()/2, EPD_BLACK);
  display.display();
  Particle.publish("Stat", "Display Updated white");
  delay(5 * 1000);

  display.clearBuffer();
  display.fillScreen(EPD_BLACK);
  display.display();
  Particle.publish("Stat", "Display Updated black");
  delay(5 * 1000);
}
jasonthenderson commented 4 years ago

Thanks a lot Karl, traveling until Friday- will try this as soon as I get back.

On Tue, Dec 31, 2019 at 7:43 PM Karl G notifications@github.com wrote:

so based on my first pass observations, it appears part of our problem is the SPI interface on the mesh products.

looking at the SPI output on an scope, I think we're running too hi freq. also, the default now for the particle firmware is mode 3, which mode 0 I think is what the EPD is expecting.

I can at least now change the fillScreen color. see if this works for you.

void setup(void) { display.begin(true); SPI.begin(); // SPI.begin(SPI_MODE_MASTER); // SPI.setBitOrder(MSBFIRST); SPI.setClockDividerReference(SPI_CLK_ARDUINO); SPI.setDataMode(SPI_MODE0);

Particle.publish("Stat", "Initialized"); }

void loop() { display.clearBuffer(); display.fillScreen(EPD_WHITE);

// still doesn't draw anything display.drawPixel(display.width()/2, display.height()/2, EPD_BLACK); display.display(); Particle.publish("Stat", "Display Updated white"); delay(5 * 1000);

display.clearBuffer(); display.fillScreen(EPD_BLACK); display.display(); Particle.publish("Stat", "Display Updated black"); delay(5 * 1000); }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rickkas7/Adafruit_EPD_RK/issues/1?email_source=notifications&email_token=ABVTMGYF7QI6JXWOFFBJUEDQ3P7OXA5CNFSM4H4GBSOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH44ARY#issuecomment-570015815, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVTMG3ETGRS3HS5HMFQNCDQ3P7OXANCNFSM4H4GBSOA .

karlg100 commented 4 years ago

Well, after spending a few hours looking at this, I'm not much from where I started, and giving up for now.

It does appear there's SPI compatibility issues with Particle, and I see that the Adafruit libraries rely on certain flags to exist, like SPI_HAS_TRANSACTION. https://community.particle.io/t/ssd1305-issues-on-spi/50958/14 https://github.com/particle-iot/device-os/issues/1668

On the other hand, the Adafruit software SPI (avoiding using the SPI particle implementation) doesn't work either. Which leads me to believe there's some other issue. I don't have a non-particle board to test (nor the patience at this point) to see if I can even get this display to work on another platform.

Nonetheless, I think there's more work that needs to be done here, and I don't have the skills or time to figure out what. Perhaps @rickkas7 can take a look and figure out what's wrong.

jasonthenderson commented 4 years ago

@rickkas7 it would be great if you could take a look. I even found the epd feather wasn’t working with my Boron, that should be pretty easy to reproduce since I think you initially tested with the Epd feather.