-
Notifications
You must be signed in to change notification settings - Fork 134
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
Support for 64x48 OLED Display #42
Comments
@csskevin do you have a link to the ebay/product page and/or datasheet of the device? |
Bought it through amazon. The contributer link https://www.wemos.cc/product/oled-shield.html |
Have you tested it with the luma.examples? Can you try this command:
|
There I get following error: |
The good news is that it should work with a small fix, but presently won't work as-is. The device only supports certain modes - see https://github.com/rm-hull/luma.oled/blob/master/luma/oled/device.py#L124-L129 To make it work we would need to find out the correct values for the multiplex and clock divider, and add an entry like: (64, 48): dict(multiplex=???, displayclockdiv=???, compins=???) @csskevin I will have a look at the datasheet and see if we can suggest some values for you to try, how does that sound? |
ok. start a python console:
And type: from luma.oled import device
device This should print the path of the oled module, e.g. >>> from luma.oled import device
>>> device
<module 'luma.oled.device' from '/home/me/projects/bar/src/luma.oled/luma/oled/device.py'>
>>> Now open # Supported modes
settings = {
(128, 64): dict(multiplex=0x3F, displayclockdiv=0x80, compins=0x12),
(128, 32): dict(multiplex=0x1F, displayclockdiv=0x80, compins=0x02),
(96, 16): dict(multiplex=0x0F, displayclockdiv=0x60, compins=0x02)
}.get((width, height)) Change this so it looks like: # Supported modes
settings = {
(128, 64): dict(multiplex=0x3F, displayclockdiv=0x80, compins=0x12),
(128, 32): dict(multiplex=0x1F, displayclockdiv=0x80, compins=0x02),
(96, 16): dict(multiplex=0x0F, displayclockdiv=0x60, compins=0x02),
(64, 48): dict(multiplex=0x0F, displayclockdiv=0x60, compins=0x02)
}.get((width, height)) And try again.. (@rm-hull this is safe to do right? :) |
@rm-hull This would sound perfect. Thanks very much @thijstriemstra Thank you, the 64 x 48 width and height works, but the dimensions are not working properly. I see just a part. (I see a part from right top I think) |
@csskevin can you post a picture? |
no worries, thanks for posting. Hopefully @rm-hull can find the correct values for that line and it should be working ok. |
Thank you both very much and thanks for the fast help. |
Try: (64, 48): dict(multiplex=0x2F, displayclockdiv=0x80, compins=0x12) If you are going to test it, please use
It should look like this: You can't tell from the screengrab but there should be white outline around the shapes |
Can you alter your local copy of https://github.com/rm-hull/luma.oled/blob/master/luma/oled/device.py#L171 to read: self._const.COLUMNADDR, 0x20, 0x5F, See what happens? |
Thank you very very much, it works perfectly now |
Ok, so thats great. I'll roll out a fix for the general case, but I dont think we ever tested it for a 96x16 device - did you @thijstriemstra ? I suspect that never worked properly for the same reason the 64x48 didnt .. :-s |
I couldn't find the ticket for 96x16 other than a really old one that relates to the previous codebase, so I think you're right @rm-hull. |
Smallest OLED I tested: rm-hull/luma.oled#23 (128x32) |
@csskevin can you upgrade to luma.oled 2.2.6 please and let me know if that fixes it for you? use If so please close the ticket :-) |
Thanks for your great support. It works perfectly :) 👍 |
Hello,
Would it be possible to add a support for a 64x48 OLED display. I do not have much experience here. Can I add it manual?
Thanks
The text was updated successfully, but these errors were encountered: