-
Notifications
You must be signed in to change notification settings - Fork 1k
Updated support for 64x48 displays #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@PaintYourDragon, @ladyada could You please take a look at this PR. I need this too. |
hiya we have no way of testing this so it may be a while until we get hardware and are able to check hat this works and doesn't break other displays |
I have a 64x32 oled, I just changed this pr to 32 and it works, FYI, so that is one more definition that can be added |
@tablatronix any chance You might add this as a PR? |
Adafruit typically will not merge a pr that they have not personally tested or for products they do not sell, which is fine and understandable from a support perspective. Everything needs a code review, one little thing could break it for someone |
@tablatronix Regarding your 64x32 OLED, did you just set the resolution in your sketch, as is the current way of using the lib, or were there any change to lib code itself? |
@ladyada Could you please give me a hint as to what the expected behavior in the scroll tests is for your supported boards? The test scrolls some text to the right and downward, I have apparently uninitialized black and white pixels scrolling in from the left and top edges... |
@tablatronix Adafruit doesn't sell 64x48 or 64x32 displays, but that doesn't mean they can't support them in this lib. |
@dok-net if you have fringing on an edge then the offsets for your screen is wrong in the code |
@Misiu the problem is not testing, the problem is support for paying customers, the risk of breaking a library for paid products and causing uneeded support issues for in house testing by adding support for something not in their product line is not worth it. Also there are unlimited variations of these displays, with different memory mapping etc. you have chinese sources of red tab, blue tab, green tab displays and they might all have different init codes, most lack a reset line and can get stuck. |
hihi we will get to this but yes its a lower priority and hard to test :/ |
@tablatronix most of those displays use SSD1306. The best part is that support for 64x48 display is already written and tested. All needed it adding it here. |
@Misiu Could you please switch to my fork instead of @mcauser 's, if you haven't already done so. I would be specifically interested in feedback on the scrolling behavior I've mentioned. I am asking you because I have merged Adafruit's latest changes, created a proper new splash image, while mcauser would appear to have moved on for 3 years now. |
@dok-net sure, I get back home and do a simple test using Wemos D1 and their display. |
The white noise that's scrolled in from the left is the same in mcauser's old version as it is in my merge of the current Adafruit lib. |
With regards to hardware scrolling, you have to remember the SSD1306 has no idea you are using it to power a smaller 64x48 OLED. It simply scrolls the entire 128x64 buffer. The white noise / artefacts you see is just an uninitialised block of the display memory. When you initalise this library to work with a 64x48 OLED, you're effectively just restricting which parts of the display memory is written to. Same as when you draw a line, you give it an x, y, w and h and feed in the bytes just for that rectangle. I haven't used this library in a while, but am happy to assist with testing with my growing collection of displays and dev boards. |
|
@mcauser @ladyada I've fixed this now by using the full 128 "segments" with any display width, the 64x48 only gets special treatment for the OLED being bound at 32 columns horizontal offset. |
Somewhat unrelated... An interesting side effect of having a display with a driver with memory larger than the visible pixels is that you could use the off screen pixels as temporary volatile storage. Or if you had one of those 128x32 displays, thats exactly half of the 128x64 memory, so you could write to both memory areas and quickly flip between the two for animations. |
I have seen a forked lib that does this an adds scrolling/paging |
Working! thx @dok-net |
A heads up: I've rebased to version 2.0.1. It's my POV that this PR is complete and mergeable, additional features, like auto-scrolling, are optional features and beyond the scope of this. |
Moved to #188 after switching source branch. |
Merges the support originally added in https://github.com/mcauser/Adafruit_SSD1306.git with the head of adafruit/Adafruit_SSD1306.
The splash screen was adopted to mirror that of the other resolution displays.
Relevant displays are for instance those for the Wemos/LOLIN D1 OLED shield.