0

2.13" Monochrome E-Ink Bonnet Resolution
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

2.13" Monochrome E-Ink Bonnet Resolution

by csotzing on Tue May 11, 2021 12:41 pm

Hi there,
I'm building a humidity/temperature display with a Pi Zero and a 2.13" Monochrome E-Ink Bonnet. I've got everything running well but I noticed some funny things with the display, namely that the viewable resolution is not 250x122 and requires an y offset when drawing to the screen. Snipet of python code here:

Code: Select all | TOGGLE FULL SIZE
        self.display.fill(Adafruit_EPD.WHITE)
        image = Image.new("RGB", (self.display.width, self.display.height), color=WHITE)
        draw = ImageDraw.Draw(image)

        x_offset=0
        y_offset=6
        calib_display_width=249
        calib_display_height=115

        #debug grid
        draw.line(
            [(0+x_offset,0+y_offset),(calib_display_width+x_offset,calib_display_height+y_offset)],
            fill=BLACK,
        )
        draw.line(
            [(0+x_offset,calib_display_height+y_offset),(calib_display_width+x_offset,0+y_offset)],
            fill=BLACK,
        )
        draw.line(
            [(0+x_offset,0+y_offset),(0+x_offset,calib_display_height+y_offset)],
            fill=BLACK,
        )
        draw.line(
            [(0+x_offset,calib_display_height+y_offset),(calib_display_width+x_offset,calib_display_height+y_offset)],
            fill=BLACK,
        )
        draw.line(
            [(calib_display_width+x_offset,calib_display_height+y_offset),(calib_display_width+x_offset,0+y_offset)],
            fill=BLACK,
        )
        draw.line(
            [(calib_display_width+x_offset,0+y_offset),(0+x_offset,0+y_offset)],
            fill=BLACK,
        )
        draw.line(
            [(0+x_offset,(calib_display_height/2)+y_offset),(calib_display_width+x_offset,(calib_display_height/2)+y_offset)],
            fill=BLACK,
        )
        draw.line(
            [(0+x_offset,(calib_display_height/4)+y_offset),(calib_display_width+x_offset,(calib_display_height/4)+y_offset)],
            fill=BLACK,
        )
        draw.line(
            [(0+x_offset,calib_display_height-(calib_display_height/4)+y_offset),(calib_display_width+x_offset,calib_display_height-(calib_display_height/4)+y_offset)],
            fill=BLACK,
        )


This will draw a box with two diagonal lines at the limits of the viewable screen. As you can see I had to put a y offset of 6 in and the actual pixel display area was 249x115.

TBH I don't really mind, I worked around it, but out of curiosity is this user error or an issue with the bonnet and/or adafruit_epd driver? Thanks for your help!

csotzing
 
Posts: 3
Joined: Fri May 07, 2021 10:56 pm

Re: 2.13" Monochrome E-Ink Bonnet Resolution

by mikeysklar on Wed May 12, 2021 6:01 pm

Looking through out Weather and Calendar examples for the Pi it looks as though we are doing small indentations of -2 or -5 when calling draw.text to stay away from the edges. This seems less like a bug and just good indentation practice to leave some edge space.

https://learn.adafruit.com/raspberry-pi ... endar-code
https://learn.adafruit.com/raspberry-pi ... ation-code

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: 2.13" Monochrome E-Ink Bonnet Resolution

by csotzing on Thu May 13, 2021 7:49 am

Makes sense that you shouldn't print at the extreme edges, totally agree. It might be worth mentioning in the website specs that the printable area can be slightly smaller than advertised however so other customers won't be surprised. No issue for me, I was able to work around it and I really love the product, driver is really easy to use too. Nice job.

csotzing
 
Posts: 3
Joined: Fri May 07, 2021 10:56 pm

Re: 2.13" Monochrome E-Ink Bonnet Resolution

by icegoat on Sun Jun 06, 2021 2:18 pm

Interesting-- I saw something slightly different on my copy of the 2.13" Mono E-Ink Bonnet:

I have a true 250x122 viewable area, but it appears to be 6 pixels shifted up.

That is, if I send the 250x122 images in the demo, the top 6 rows of pixels do not appear and the whole image is shifted up 6 pixels (leaving a white space at the bottom).
IMG_1556.JPG
IMG_1556.JPG (659.22 KiB) Viewed 61 times


However, if I edit the display= declaration to say it's a 250x128 image,
Code: Select all | TOGGLE FULL SIZE
display = Adafruit_SSD1680(128, 250,

I can write to the entire display (the top 6 rows are still cropped, so I should use the bottom 250x122 of this 250x128 image):
IMG_1555.JPG
IMG_1555.JPG (680.64 KiB) Viewed 61 times

icegoat
 
Posts: 2
Joined: Fri Jun 04, 2021 3:02 pm

Re: 2.13" Monochrome E-Ink Bonnet Resolution

by mikeysklar on Sun Jun 06, 2021 6:51 pm

Yeah, I assume it works correctly if you skip the first 6 rows? Is that the case?

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: 2.13" Monochrome E-Ink Bonnet Resolution

by icegoat on Thu Jun 10, 2021 2:46 pm

Yes, works fine if I just shift the image down 6 rows!

(I just wanted to share that it's not that I had 6 fewer rows and needed to send a smaller image, it's just that the visible display address seems to be shifted down 6 rows on mine, in case that's useful for any future users who are experimenting with their copies)

icegoat
 
Posts: 2
Joined: Fri Jun 04, 2021 3:02 pm

Re: 2.13" Monochrome E-Ink Bonnet Resolution

by mikeysklar on Fri Jun 11, 2021 1:49 pm

@icegoat,

Gotcha. You get the full resolution (as advertised) you just need to start with a +6 offset. Thank you for the clarification.

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.