Getting started: Adafruit RP2040 Feather ThinkInk

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
scobb00
 
Posts: 13
Joined: Wed Sep 08, 2021 8:28 am

Getting started: Adafruit RP2040 Feather ThinkInk

Post by scobb00 »

Got a brand spankin' new Adafruit RP2040 Feather ThinkInk and a EPD 2.9" Monochrome 296x128 Pixel Display.

Using the https://learn.adafruit.com/rp2040-ardui ... e/overview
Was able to load the Arduino board info and libraries by Earle Philhower.

Got the first fade demo up and working no problem.

Using the great guide: https://learn.adafruit.com/adafruit-2-9 ... s/overview

Was able to load all of the Adafruit libraries.

Used the example ThinkInk_mono and set up the display using:

Code: Select all

// 2.9" Monochrome displays with 296x128 pixels and UC8151D chipset
ThinkInk_290_Mono_M06 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
No other defaults are changed yet:

Code: Select all

#define EPD_CS      9
#define EPD_DC      10
#define SRAM_CS     6
#define EPD_RESET   8 // can set to -1 and share with microcontroller Reset!
#define EPD_BUSY    7 // can set to -1 to not use a pin (will wait a fixed delay)
No joy. The serial debug is running fine - says it is doing the various display demos.

Where does one start debugging this? Has anyone got this same setup working with Arduino?
Should I give Circuit Python a go?

User avatar
scobb00
 
Posts: 13
Joined: Wed Sep 08, 2021 8:28 am

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by scobb00 »

I strongly suspect it is the chip select lines (such as EPD_CS) defined above that is the issue. I can find no schematic or docs to help determine what those values should be.

User avatar
scobb00
 
Posts: 13
Joined: Wed Sep 08, 2021 8:28 am

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by scobb00 »

Unlike all of the other boards, the Adafruit RP2040 Feather ThinkInk page does not have a link to pinouts or the schematics.

Can anyone point me to the schematics or tell me how to find the pins to assign for the chip select etc.

User avatar
adafruit_support_carter
 
Posts: 29153
Joined: Tue Nov 29, 2016 2:45 pm

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by adafruit_support_carter »

The guide for that particular Feather is still in works. It should be out soon and will have the pinout info, code examples, etc. Keep an eye out for it. I'll try and remember to post back here as well when it goes live.

User avatar
mcmccam
 
Posts: 1
Joined: Tue Apr 04, 2017 6:47 pm

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by mcmccam »

The EPD pins are listed on the bottom of the board. Took me a bit to find that too.
BUSY=16
RESET=17
DC=18
CS=19

I do not know what the SRAM_CS pin would be.

User avatar
scobb00
 
Posts: 13
Joined: Wed Sep 08, 2021 8:28 am

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by scobb00 »

Looks like the learning page is up - thank you:
https://learn.adafruit.com/adafruit-rp2 ... r-thinkink

Also, included updated Arduino (and I assume Circuit Python) examples. Using the guidance provided in the leaning page, I was able to get things set up.

I think the tricky part remaining is figuring out which ThinkInk library matches the EPD that you have.

The example pulls in the library that includes a ton of devices.
See: libraries\Adafruit_EPD\src\panels

It contains 29 or so panel types of the form: ThinkInk_290_Mono_M06.h

The choices in the example code do not include all of them - the commented out choices include descriptions help to decode the library. Unfortunately, not all 29 are included. I did figure it out via older example code that had my display.

Happy to say all is up and running.

Thanks to all!

User avatar
johnpritch
 
Posts: 17
Joined: Thu Mar 02, 2017 9:57 pm

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by johnpritch »

Hello, I also have the RP2040 ThinkInk with the EPD 2.9" Monochrome 296x128 Pixel Display (https://www.adafruit.com/product/4262). I'm having an issue similar to what you originally posted; however, I am not able to get the display to show anything. It remains blank.

Using the learning guide and the EPD examples, I have stripped-down code shown below which appears to run ("Text demo" shows every 2 sec in the serial monitor), but the display does not react.

To confirm it is not a display or ThinkInk board problem, I purchased two - image below. Both boards can run blinky and also output to the serial port so I know they function, generally. But both displays remain blank.

Can you provide any guidance? Many thanks in advance.

Code: Select all

#include "Adafruit_ThinkInk.h"

#define EPD_DC PIN_EPD_DC       // ThinkInk 24-pin connector DC
#define EPD_CS PIN_EPD_CS       // ThinkInk 24-pin connector CS
#define EPD_BUSY PIN_EPD_BUSY   // ThinkInk 24-pin connector Busy
#define SRAM_CS -1              // use onboard RAM
#define EPD_RESET PIN_EPD_RESET // ThinkInk 24-pin connector Reset
#define EPD_SPI &SPI1           // secondary SPI for ThinkInk

// 2.9" Monochrome displays with 296x128 pixels and UC8151D chipset
ThinkInk_290_Mono_M06 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

void setup() {
  Serial.begin(115200);
  while (!Serial) { delay(10); }
  Serial.println("Adafruit EPD full update test in mono");
  display.begin(THINKINK_MONO);
}

void loop() {
  
  Serial.println("Text demo");
  display.clearBuffer();
  display.setTextSize(1);
  testdrawtext("Hello world.", EPD_BLACK);
  display.display();

  delay(2000);

}


void testdrawtext(const char *text, uint16_t color) {
  display.setCursor(0, 0);
  display.setTextColor(color);
  display.setTextWrap(true);
  display.print(text);
}
two-rp2040s.png
two-rp2040s.png (606.78 KiB) Viewed 339 times

User avatar
scobb00
 
Posts: 13
Joined: Wed Sep 08, 2021 8:28 am

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by scobb00 »

I think it might be missing an argument. In my code:

Code: Select all

ThinkInk_290_Mono_M06 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);
Your code doesn't have the last EPD_SPI. Give that a shot.

User avatar
johnpritch
 
Posts: 17
Joined: Thu Mar 02, 2017 9:57 pm

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by johnpritch »

scobb00 wrote: Fri May 26, 2023 6:35 amI think it might be missing an argument.
Yep, that was it!

For reference this is the final working code with pic below. Thanks for your help.

Code: Select all

#include "Adafruit_ThinkInk.h"

#define EPD_DC PIN_EPD_DC       // ThinkInk 24-pin connector DC
#define EPD_CS PIN_EPD_CS       // ThinkInk 24-pin connector CS
#define EPD_BUSY PIN_EPD_BUSY   // ThinkInk 24-pin connector Busy
#define SRAM_CS -1              // use onboard RAM
#define EPD_RESET PIN_EPD_RESET // ThinkInk 24-pin connector Reset
#define EPD_SPI &SPI1           // secondary SPI for ThinkInk

// 2.9" Monochrome displays with 296x128 pixels and UC8151D chipset
ThinkInk_290_Mono_M06 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY, EPD_SPI);

void setup() {
  Serial.begin(115200);
  while (!Serial) { delay(10); }
  Serial.println("Adafruit EPD full update test in mono");
  display.begin(THINKINK_MONO);
}

void loop() {
  
  Serial.println("Text demo");
  display.clearBuffer();
  display.setTextSize(1);
  testdrawtext("Hello world.", EPD_BLACK);
  display.display();

  delay(2000);

}


void testdrawtext(const char *text, uint16_t color) {
  display.setCursor(0, 0);
  display.setTextColor(color);
  display.setTextWrap(true);
  display.print(text);
}
PXL_20230526_150245653.jpg
PXL_20230526_150245653.jpg (74.68 KiB) Viewed 331 times

User avatar
adafruit_support_carter
 
Posts: 29153
Joined: Tue Nov 29, 2016 2:45 pm

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by adafruit_support_carter »

@scobb00 Good catch!

@johnpritch Just to check if there is any issue with the guide(s)? It seems like you were running an example from the "generic" eink guide that is linked from the PID 4262 page? Those would indeed probably not work as they would end up not using the correct SPI bus.

The code example from the guide for the Feather RP2040 ThinkInk should have worked as shown:
https://learn.adafruit.com/adafruit-rp2 ... -example-2

The SPI bus used by the Feather RP2040 ThinkInk to talk to the EPD is SPI1. So not the default SPI instance that is used by the generic examples.

Let us know if it'd help to update any of the Learn Guide, etc.

User avatar
scobb00
 
Posts: 13
Joined: Wed Sep 08, 2021 8:28 am

Re: Getting started: Adafruit RP2040 Feather ThinkInk

Post by scobb00 »

My initial problem was only that I was too impatient to wait for you to get the guide up - given that I was on a rapid refresh cycle waiting for the boards to become available :-)

The other thing - which you could add to the guides (of probably all of the displays) is the mapping of the display to the library calls for that particular display.

For example, the sample code for the Adafruit RP2040 Feather ThinkInk had a dozen or so example calls for various displays. Just not my particular one. As such, I had to root around in the library code to try and find the match. I was able to do so, but it would be easier cleaner to just have the mapping somewhere as a table - possible with devices having links into the appropriate row in that table.

Overall, the Adafruit devices are wonderful and the learning guides are a great help.

OK - now that you got me thinking about the learning guides... Many of them are quite out of date - with references to old versions of IDEs. It is probably a full time job to keep them up to date... but that is my two farthings.

Thanks,
Steve

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”