SSD1306 Now with 64x48 for D1 Mini Oled Shield [SOLVED] #6307
Replies: 1 comment
-
Posted at 2019-09-14 by @MaBecker check this module, it can handle 64x48. https://github.com/noopkat/oled-js/blob/9888b62750df21cc62ebfb694de8f14fad43e262/oled.js#L72 Posted at 2019-09-16 by DamianMontero Thank you @MaBecker The working code from: https://github.com/bocajs/NodeBotDays/blob/master/Espruino/oled.js
BUT... What value could be causing this? Posted at 2019-09-16 by DamianMontero @gfwilliams Posted at 2019-09-16 by @MaBecker Make sure this fits the oled height Posted at 2019-09-16 by @fanoush
It is this line https://github.com/bocajs/NodeBotDays/blob/master/Espruino/ssd1306.js#L54 you need to start and end it on right column, e.g. 31,95 Posted at 2019-09-16 by @gfwilliams To contribute you can just do it through GitHub... There'll be tutorials online but basically you just fork https://github.com/espruino/EspruinoDocs, replace the version of the file on there with the updated file, then issue a pull request - and as long as the '.md' file contains a note about the feature and it's not going to break code for anyone else then I can pull it in. Posted at 2019-09-19 by DamianMontero @MaBecker - I don't know what the value but you can see 62 that it's height>>3 already. What's this value suppose to be? @fanoush - So are you saying that instead of 1 to 64 I just do everything: 30-94? I think there's something off. I mean I could just think of it like that but obviously it's ignoring the problem. ALSO changing the WIDTH simply cuts the screen in the middle. So obviously there still needs to be a shift to the right. where would that be? Any help would be appriciated. @gfwilliams Once I have this done I'll submit a change that will NOT affect any of the existing resolutions but also ADD this one. Posted at 2019-09-20 by @fanoush No, you need to fix that line I linked so it does not start at zero and end at 127. Then you can draw at zero and that line will take care of moving it where it belongs. The SSD1306 controller works with 128pixel width so smaller displays show just some subset of available memory, typically in the middle, so when sending data the destination column should be e.g. 31, not 0. Then you must also reduce the WIDTH down from 128 to match width of that 31-95 window (=64). Posted at 2019-09-21 by DamianMontero @fanoush Posted at 2019-09-21 by @fanoush Hard to guess without seeing the code. When in WebIDE you may dump the Graphics object via oled.dump() method (it will show as picture in the IDE) so you can make sure the framebuffer data is OK (and e.g. width is really 64, not more), then if data is OK it is either in flip command sending (too many or too few?) data or can be also in display initialization. Posted at 2019-09-22 by DamianMontero
Posted at 2019-09-22 by @fanoush
Actually I suggested 31,95 (0x1f,0x5f) and now I see you even have 0x20, 0x62 there which is width of 66, not 64. BTW, the original was 127 (not 128). Looks like you simply don't trust odd numbers? ;-) Posted at 2019-09-22 by DamianMontero @fanoush you were (of course) correct. My code looks now like this and works flawlessly. I'm going to post a modified version of the SSD1603.js module to github for @gordon with full compatibility with this new resolution as well as the other versions of course.
Posted at 2019-09-22 by @MaBecker Great, you solved it - Thanks for the PR Posted at 2019-09-22 by DamianMontero @gfwilliams EDITED |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-09-13 by DamianMontero
I need your help with the SSD1306 driver for the ESP8266 D1.Mini (great little device with MANY HATS that stack up)
The issue is the text DOES show up but of course it's line up wrong. BUT more importantly and get double height when trying the same with 64x48 from WEMOS which has a wonderful kit with the OLED and Two buttons all through I2C (or SPI)
I'm aware that I have to modify the http://www.espruino.com/modules/SSD1306.js module and change the OLED_WIDTH and pass the valid 48 height. but I know there must be other changes.
As you can see from the screenshot below. it's offset is off (easy to fix) but I'm wondering why the double-scan style font?
Any help would be appreciated. and yes. I went through all the SSD1306 posts. but none were working with this new design.
I DID get the SSD1306 drivers to work out of the box on this on the ESP8266 with 128x32 integrated OLED From TTGO and HELTEC
https://www.banggood.com/LILYGO-TTGO-ESP8266-0_91-Inch-OLED-Display-Module-For-Arduino-Nodemcu-p-1205904.html
Beta Was this translation helpful? Give feedback.
All reactions