📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Attention all domestic customers! Please place UPS Ground and USPS First Class & Priority orders by 11am ET Monday December 9, 2019 📬❄️📦 Attention all international customers! Please place all UPS WORLDWIDE EXPRESS; SAVER, and DHL EXPRESS WORLDWIDE orders by 11am ET Monday December 9, 2019 📬❄️📦
0

Connections for Adafruit 2.13" Featherwing Monochrome eInk d
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Connections for Adafruit 2.13" Featherwing Monochrome eInk d

by iGerbil on Tue Aug 13, 2019 11:51 am

I'd like to connect a 2.13" eink display to a standard Arduino Uno board. However it is difficult to understand what pins need to be connected. This page https://learn.adafruit.com/adafruit-ein ... s?view=all only highlights the SPI pins area, without saying what must be connected to what...
Does anyone know how to connect this display to a standard Arduino Uno board? Thanks in advance!

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by adafruit_support_bill on Tue Aug 13, 2019 12:41 pm

This is covered in the Wiring section: https://learn.adafruit.com/adafruit-ein ... wiring-6-2
Start by connecting the power pins

3-5V Vin connects to the microcontroller board's 5V or 3.3V power supply pin
GND connects to ground

Required SPI Pins
These use the hardware SPI interface and is required so check your microcontroller board to see which pins are hardware SPI

CLK connects to SPI clock. On Arduino Uno/Duemilanove/328-based, thats Digital 13. (For other Arduino-compatibles See SPI Connections for more details)
MISO connects to SPI MISO. On Arduino Uno/Duemilanove/328-based, thats Digital 12. (For other Arduino-compatibles See SPI Connections for more details)
MOSI connects to SPI MOSI. On Arduino Uno/Duemilanove/328-based, thats Digital 11. (For other Arduino-compatibles See SPI Connections for more details)

Other Digital I/O Pins
These can be set in the sketch to any pins you like but to follow the exact example code we'll use the following:

ECS connects to our e-Ink Chip Select pin. We'll be using Digital 10 but you can later change this to any pin
D/C connects to our e-Ink data/command select pin. We'll be using Digital 9 but you can later change this pin too.
SRCS connects to our SRAM Chip Select pin. We'll be using Digital 8 but you can later change this to any pin
RST connects to our e-Ink reset pin. We'll be using Digital 5 but you can later change this pin too.
BUSY connects to our e-Ink busy pin. We'll be using Digital 3 but you can later change this pin too.

adafruit_support_bill
 
Posts: 75227
Joined: Sat Feb 07, 2009 10:11 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Tue Aug 13, 2019 2:00 pm

Ok, I've read that, but how can I know what pinns need to be used on the display's connector? The connection scheme you pointed out refers to connecting an Arduino to a 1.54" display which has connections merked on its board.
I need to connect a 2.13" Featherwing display, and it just says "FeatherWing usage is easy, simply plug your Feather into the Wing". But what about a normal Arduino if there is no display's connector pinout?
The picture you provide at https://learn.adafruit.com/adafruit-ein ... s?view=all while having DC, ECS, etc. on the PCB doesn't indicate any pin for CLK, MISO and MOSI (I guess you need to solder the Busy wire in case you want to use it)
So, what connections on the display board should I use for CLK, MISO and MOSI? (I guess they are the remaining 3 close to the SPI red label, but which is which?)
Attachments
adafruit_products_pinouts.jpg
adafruit_products_pinouts.jpg (133.14 KiB) Viewed 254 times

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by adafruit_support_bill on Tue Aug 13, 2019 2:34 pm

It follows the standard Feather pinout:

Image

adafruit_support_bill
 
Posts: 75227
Joined: Sat Feb 07, 2009 10:11 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Tue Aug 13, 2019 7:40 pm

Ok, that's working now, I finally managed to connect the PED to my Arduino Nano board.

But I think I have found a small bug in the sample code (EPDTest sketch that is included with the EPD library). There is

Code: Select all | TOGGLE FULL SIZE
#define SRAM_CS     11


but pin 11 is normally used by MOSI. I tried to change that to

Code: Select all | TOGGLE FULL SIZE
#define SRAM_CS     8


and it works perfectly. Also, drawing triangles seems to cause some erratic results. These lines

Code: Select all | TOGGLE FULL SIZE
  testdrawtext("1002", COLOR1);
  display.fillTriangle(105,45,185,35,145,95,COLOR1);
  display.fillRect(210,5,30,5,COLOR1);
  display.fillRect(210,15,30,5,COLOR1);
  display.fillRect(210,25,30,5,COLOR1);
  display.fillRect(210,35,30,5,COLOR1);


gives the result you can see in the attached image.

IMG_6555.JPG
IMG_6555.JPG (618.07 KiB) Viewed 237 times


If you remove the fillTriangle then the rectangles and the text are displayed ok. Is it a bug or am I missing something?

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Tue Aug 13, 2019 9:25 pm

There's also another thing: sometimes the text is displayed in a different postion from what is expected

IMG_6556.JPG
IMG_6556.JPG (593.05 KiB) Viewed 231 times


some pixels are cut off, despite the text cursor always starting at 0,0 And looks like the top pixels are at the bottom of the screen...

Any idea why this is happening?

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Wed Aug 14, 2019 6:51 am

The text keeps shifting.... in the loop, a valure from a pressure sensor is updated every 5 minutes, but the text keeps shifting, despite the cursor being set at 0,0 at every redraw. The thing has been running all night, and now this is the result....
Is there any way to prevent that?

IMG_6558.JPG
IMG_6558.JPG (633.04 KiB) Viewed 209 times

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by adafruit_support_bill on Wed Aug 14, 2019 7:20 am

Double-check all your connections. Make sure all the jumper pins are firmly gripped by the spring contacts. A marginal connection on the SPI bus could cause dropouts while transmitting the frame-buffer.

adafruit_support_bill
 
Posts: 75227
Joined: Sat Feb 07, 2009 10:11 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Wed Aug 14, 2019 10:36 am

Connections checked, they seem ok. I don't think it's a hardware problem.
The triangle is alway distorted, I tried different shapes, positions and sizes. When you have a triangle other elements get distorted too (see picture in my previous post). As soon as you remove the triangle the problem (distorted text and rectangles) disappear and things are ok.
Also, on startup I draw a test string, and this is always correct, both after upload and Arduino reset. At each subsequent redraw the text drawing position seems to get erratic.

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by adafruit_support_bill on Wed Aug 14, 2019 10:46 am

I'll check with the library authors and see if they can offer any insight.

adafruit_support_bill
 
Posts: 75227
Joined: Sat Feb 07, 2009 10:11 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Wed Aug 14, 2019 11:09 am

Great, thanks! FYI I just tested the drawline command and it seems to have problems too (little wonder, I bet the triangle drawing is using the line command). This code

Code: Select all | TOGGLE FULL SIZE
  display.drawLine(210,45,240,45,COLOR1);
  display.drawLine(240,45,225,65,COLOR1);
  display.drawLine(225,65,210,45,COLOR1);


generates the triangle you see here

IMG_6559.JPG
IMG_6559.JPG (502.91 KiB) Viewed 196 times


The top line is not horizontal as it should be, and when you draw these lines, other graphics also get screwed up as it happens when you draw a triangle

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Wed Aug 14, 2019 11:16 am

One more test, I tried to draw a horizontal line by using

Code: Select all | TOGGLE FULL SIZE
  display.drawFastHLine(210,45,30,COLOR1);


instead of

Code: Select all | TOGGLE FULL SIZE
display.drawLine(210,45,240,45,COLOR1);


Same results: the triangle is distorted and the line that should be horizontal simply isn't....

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by adafruit2 on Wed Aug 14, 2019 1:22 pm

ig, please post your complete sketch so we can try it

adafruit2
Site Admin
 
Posts: 18815
Joined: Fri Mar 11, 2005 7:36 pm

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Wed Aug 14, 2019 8:00 pm

I stripped out the pressure sensor so you don't need to connect one in case you test with the real device.

Just the graphics stuff is there, but it's enough to produce the quirky results. Also in this case, nothing happens in the loop()



Code: Select all | TOGGLE FULL SIZE
/***********************************
 Test sketch based on EPDtest provided with library
 ***********************************/


#include <Adafruit_GFX.h>    // Core graphics library
#include "Adafruit_EPD.h"

// EPD definitions
#define EPD_CS     10
#define EPD_DC      9
#define SRAM_CS     8 // originally was 11
#define EPD_RESET   5 // can set to -1 and share with microcontroller Reset!
#define EPD_BUSY    -1 // 7 // can set to -1 to not use a pin (will wait a fixed delay)

/* Uncomment the following line if you are using 2.13" monochrome 250*122 EPD */
Adafruit_SSD1675 display(250, 122, EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

#define COLOR1 EPD_BLACK
#define COLOR2 EPD_RED


void setup() {
  Serial.begin(115200);
  while (!Serial) { delay(10); }
  Serial.println("Adafruit EPD test");

  display.begin();

  // large block of text
  display.clearBuffer();
  //testdrawtext("p 1002 Lorem ipsum dolor sit amet", COLOR1);
  testdrawtext("1002", COLOR1);

  // try to comment this line and see the change,,,,
  display.fillTriangle(210,45,240,35,225,65,COLOR1);

  // even drawing a triangle using drawLine creates some problems... try to comment/uncomment the lines below
  //display.drawLine(210,45,240,45,COLOR1);
  //display.drawFastHLine(210,45,30,COLOR1);
  //display.drawLine(240,45,225,65,COLOR1);
  //display.drawLine(225,65,210,45,COLOR1);
 
  display.fillRect(210,5,30,5,COLOR1);
  display.fillRect(210,15,30,5,COLOR1);
  display.fillRect(210,25,30,5,COLOR1);
  display.fillRect(210,35,30,5,COLOR1);

  display.display();

}

void loop() {
  // put your main code here, to run repeatedly:

}

// simple text drawing routine
void testdrawtext(char *text, uint16_t color) {
  display.setCursor(0, 0);
  display.setTextColor(color);
  display.setTextWrap(true);
  display.setTextSize(8);
  display.print(text);
}



I hope this can help you understand what's going on!
Attachments
MonitorTester.ino
(1.81 KiB) Downloaded 6 times

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Re: Connections for Adafruit 2.13" Featherwing Monochrome eI

by iGerbil on Fri Aug 23, 2019 7:12 am

HI,
any feedback from the developers on this bug? I'm really havving difficulties in using the display, I needed to draw triangles among other things....

iGerbil
 
Posts: 13
Joined: Tue Aug 13, 2019 11:44 am

Please be positive and constructive with your questions and comments.


cron