Closed wildestpixel closed 1 year ago
not surpring - it could be a different chipset or have different offsets. if you figure it out plesae submit a PR! :)
okay - for these displays, when the displayio_ssd1306_simpletest.py has parameters of :
WIDTH = 96 HEIGHT = 64
The offset is 32 pixels in from x and y meaning text is displayed correctly when :
text = "Hello !!!" text_area = label.Label( terminalio.FONT, text=text, color=0xFFFFFF, x=32, y=36 )
Allowing for the half glyph height of terminalio scale 1 font at 4px.
How to get this into a PR I can't imagine, but handle-able as a manual process in using the display. They seem to be becoming more widely available for about $2 or $3. It definitely is SSD1306 based - doesn't seem to like to be spoken to as SH1106 or SH1107 .
@wildestpixel maybe something like this https://github.com/adafruit/Adafruit_CircuitPython_SSD1306/blob/3b350ba2654943f66a8c231c6795891ca39b535f/adafruit_ssd1306.py#L180
This tests perfectly and framebuf's text class with size=2 is good.
Probably for a display this size using framebuf is perfectly adequate to display a single sensor string rather than using displayio. Would close as a consequence ?
@wildestpixel I have been through all this adapting the adafruit/Adafruit_CircuitPython_SSD1306 library to work with a wider range of displays -- and specifically this 0.49" 64x32 OLED display. It is a great little screen!
Two main issues came up:
display clock div
and com pin
values.This means that some 0.49" 64x32 screens may just need the fix to 1 above and some need a fix to both 1 and 2! Both SH1106 and SSD1306 chipsets work with Page Addressing Mode if you want one codebase that works with all.
Please see the corresponding issues 52 and 56 for the adafruit/Adafruit_CircuitPython_SSD1306 project: adafruit/Adafruit_CircuitPython_SSD1306/issues/52 and adafruit/Adafruit_CircuitPython_SSD1306/issues/56 which solved 1 and 2 above, respectively.
I was just writing in an issue over there that support could be improved here (see https://github.com/adafruit/Adafruit_CircuitPython_SSD1306/issues/40#issuecomment-825850964) and saw this issue! The logic here in this displayio library could definitely be extended to include the changes made over there to increase coverage.
wow ! Thats superb Adam, I had resigned myself to seeing the great work done in the other library and thought it might not be PR'd into displayio due to the possible complexity - certainly out of the reach of my much more basic PR's.
Thanks indeed for your efforts - they are indeed a wonderful screen as you state.
@adamcandy Thanks a lot for all the explanations, and sorry @wildestpixel =when I was answering I as referring to your comment How to get this into a PR I can't imagine
. So I was showing an example. sorry about that. :)
I will answer in the other library, however I do not have any of these display so if you could do a PR would be great.
Thanks again adamcandy, your explanation and work on this and in the other library are greatly appreciated
Happy my comments have helped make this a bit clearer @wildestpixel and @jposada202020. This was just the result of interpreting manual descriptions and some good old experimentation! With displays not well marked it can be a bit tricky and we should make sure the library works well and efficiently for the standardised Adafruit displays at least, with generality to others a bonus!
Please have a go at extending the logic, mirroring from the development in adafruit/Adafruit_CircuitPython_SSD1306. I will try and help when I can :)
Hy Guys!
I'm trying to use a (probably) SSD1306 based 72x40 screen, experiencing similar issues. I found these related to our problem: https://github.com/micropython/micropython/issues/7281 https://github.com/micropython/micropython/pull/7411 https://github.com/micropython/micropython/commit/bc7822d8e95c40a9d5e403fd22c82b1bbad53b8b
Is there any update in this case?
we're still waiting for someone with a screen to submit a PR - anyone is welcome to send one over, we do not own a screen of this resolution to test or develop with :)
Unfortunately, I'm not that familiar with this low-level hardware related software development, but I'm here to test any implementation given in case anyone could figure this out. Until then I will try and probably fail :"D
I made a PR that work for me on my 0.49'' 64x32 I2C from LOLIN. I also tested it a 128x32 screen build on a LOLIN S2 PICO v1.0.0. But we would need someone to juge the style/logic in the code, then once that is OK, it need to be tested on as many screen as possible without the work by @adamcandy and other testing with those tiny screen.
It would be great if owner of one or multiple screen of various resolution try Pull Request #31 and put a comment to help have it accepted. Beeping @stewe93 @adamcandy @jposada202020 @wildestpixel Thanks in advance.
Sorry for the late delay...I was in deep sleep mode. I will test the PR this week :) @dglaude
Closed by #31
Using a cheap 0.49" OLED with 64 x 32px - modified simple test.py to accommodate width and height, output shows as follows - seems not to like the tiny screen size.
Running on CP 6.2 Stable
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather RP2040 with rp2040
rather than own build CP, all libraries updated from bundle automatically using the joedevivo VSCode pluginsNeed something to get the geometry corrected for the tiny OLEDs