add new SSD1306 OLED Display Size
Moderators: grovkillen, Stuntteam, TD-er
add new SSD1306 OLED Display Size
Hi,
i just added an OLED Display via I2C to my ESP-01S (1MB flash).
My problem actually is, that i only have the choice of size 64x48 or 128x64.
My small display is of size 128x32 (a tiny little 4 liner).
Did someone already change/modify the plugin for die SSD1306 OLED Plugin so that there is a possibility to change the size to 128x32?
I looked at the source code of the plugin - but at this point my programming skills seems to end.
Or has anyone a hint what i should have to change to get this display size working?
thank you all for your answers!
Michael
i just added an OLED Display via I2C to my ESP-01S (1MB flash).
My problem actually is, that i only have the choice of size 64x48 or 128x64.
My small display is of size 128x32 (a tiny little 4 liner).
Did someone already change/modify the plugin for die SSD1306 OLED Plugin so that there is a possibility to change the size to 128x32?
I looked at the source code of the plugin - but at this point my programming skills seems to end.
Or has anyone a hint what i should have to change to get this display size working?
thank you all for your answers!
Michael
Re: add new SSD1306 OLED Display Size
I have this display in use. I kicked some stuff like the top line, the indicator and limited to 2 lines. Works good for me now.
Re: add new SSD1306 OLED Display Size
did you change the _P023_OLED.ino?
Or where have you made your changes?
Can you list your changes here or send me your _P023_OLED.ino via email?
Or where have you made your changes?
Can you list your changes here or send me your _P023_OLED.ino via email?
Re: add new SSD1306 OLED Display Size
No, I changed only the _P036_FrameOLED.ino. The result looks now like this...
- Attachments
-
- 20171009095726475.jpg (8.21 KiB) Viewed 22546 times
Re: add new SSD1306 OLED Display Size
The "problem" with these small displays is they are using only every other line.
For example only the odd or even line numbers (did not check yet which are being used)
So it may help if you change the used font.
I was already looking into that myself, so likely they will be added for 2.1, when also my pull request for the new version of the library is being merged.
For example only the odd or even line numbers (did not check yet which are being used)
So it may help if you change the used font.
I was already looking into that myself, so likely they will be added for 2.1, when also my pull request for the new version of the library is being merged.
Re: add new SSD1306 OLED Display Size
would you post your Version of _P036_FrameOLED.ino or the changes you made?
With this Information i could experiment a little bit if i could be able to change it too or if i could change the normal _P023_OLED.ino...
Thx in advance
Michael
Re: add new SSD1306 OLED Display Size
so - after searching a few days and spending some time with Platformio i found the solution for the Problem with the 128x32 OLED Displays.
It is correct that the 128x32 displays shows only every other line.
My first idea was to change the whole font data and insert some blank lines in the font arrays.
That "solution" made me almost crazy - and after a while i discarded this idea because for me that made no sense.
After a while of googling i found the solution:
In the init section only two values have to be changed - then the 128x32 OLED works fine.
These values are:
For 128x64:
Plugin_023_sendcommand(0xA8); //SSD1306_SETMULTIPLEX
Plugin_023_sendcommand(0x3F); //0x1F if 128x32, 0x3F if others (e.g. 128x64)
.
.
.
Plugin_023_sendcommand(0xDA); //COMPINS
Plugin_023_sendcommand(0x12); //0x02 if 128x32, 0x12 if others (e.g. 128x64)
For 128x32:
Plugin_023_sendcommand(0xA8); //SSD1306_SETMULTIPLEX
Plugin_023_sendcommand(0x1F); //0x1F if 128x32, 0x3F if others (e.g. 128x64)
.
.
.
Plugin_023_sendcommand(0xDA); //COMPINS
Plugin_023_sendcommand(0x02); //0x02 if 128x32, 0x12 if others (e.g. 128x64)
so i spend a little bit more of time to integrate this into _P023_OLED.ino so users can select this 128x32 display in Configuration frontend:
additionally i made another change:
The font in this plugin is with fixed width - so characters like "l" or "i" take a lot of space that they normally don't need.
I implemented an additional feature so that users now can select if they want to have all characters with the same size or if the plugin should optimize width:
....and so it looks in my example:
Now i am looking what i have to do to commit these changes so they can get into the master branch or the next release so every user can use these new features.
Greets
Michael
edit: typo
It is correct that the 128x32 displays shows only every other line.
My first idea was to change the whole font data and insert some blank lines in the font arrays.
That "solution" made me almost crazy - and after a while i discarded this idea because for me that made no sense.
After a while of googling i found the solution:
In the init section only two values have to be changed - then the 128x32 OLED works fine.
These values are:
For 128x64:
Plugin_023_sendcommand(0xA8); //SSD1306_SETMULTIPLEX
Plugin_023_sendcommand(0x3F); //0x1F if 128x32, 0x3F if others (e.g. 128x64)
.
.
.
Plugin_023_sendcommand(0xDA); //COMPINS
Plugin_023_sendcommand(0x12); //0x02 if 128x32, 0x12 if others (e.g. 128x64)
For 128x32:
Plugin_023_sendcommand(0xA8); //SSD1306_SETMULTIPLEX
Plugin_023_sendcommand(0x1F); //0x1F if 128x32, 0x3F if others (e.g. 128x64)
.
.
.
Plugin_023_sendcommand(0xDA); //COMPINS
Plugin_023_sendcommand(0x02); //0x02 if 128x32, 0x12 if others (e.g. 128x64)
so i spend a little bit more of time to integrate this into _P023_OLED.ino so users can select this 128x32 display in Configuration frontend:
additionally i made another change:
The font in this plugin is with fixed width - so characters like "l" or "i" take a lot of space that they normally don't need.
I implemented an additional feature so that users now can select if they want to have all characters with the same size or if the plugin should optimize width:
....and so it looks in my example:
Now i am looking what i have to do to commit these changes so they can get into the master branch or the next release so every user can use these new features.
Greets
Michael
edit: typo
Last edited by derpunkt on 15 Oct 2017, 23:32, edited 1 time in total.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: add new SSD1306 OLED Display Size
Great job! Thanks!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: add new SSD1306 OLED Display Size
Thanks for the plugin, why in the latest firmware update the plugin updated look like not merged <2018010.
Re: add new SSD1306 OLED Display Size
What version of the firmware did you test?
The pull request was merged into the Mega branch, not the v2.0
And there are two plugins for these displays. The OLED (where this topic is about) and the Framed OLED, which was updated in the last build.
Re: add new SSD1306 OLED Display Size
With the latest 20180206 and yes this one the P023_OLED.ino
Re: add new SSD1306 OLED Display Size
Then I guess I don't understand your question.
Re: add new SSD1306 OLED Display Size
i didn't understand your question.
I looked at the actual branch - and there the latest version of P023_OLD.ino is integrated.
The last - and latest - update of this plugin was merged with pull request #545.
...so i don't understand what you mean with "in the latest firmware update the plugin updated look like not merged <2018010"...sorry...
I looked at the actual branch - and there the latest version of P023_OLD.ino is integrated.
The last - and latest - update of this plugin was merged with pull request #545.
...so i don't understand what you mean with "in the latest firmware update the plugin updated look like not merged <2018010"...sorry...
Re: add new SSD1306 OLED Display Size
When I update the firmware in ota with the latest release from here https://github.com/letscontrolit/ESPEasy/releases the plugin as not been updated, the source show the older one
Re: add new SSD1306 OLED Display Size
ok, now i understand.
You must download the mega-Release.
This is one entry below...
Release mega-20180206
You must download the mega-Release.
This is one entry below...
Release mega-20180206
Re: add new SSD1306 OLED Display Size
Will this change get pushed to the 1306framed display?
Re: add new SSD1306 OLED Display Size
Not this change, but there will be support for other display sizes in the OLED framed plugin.
About a week ago, I updated a lot in the code for the framed plugin and one of the things was in preparation of other display sizes.
No estimate yet on when it will happen, but for sure that it will happen
Re: add new SSD1306 OLED Display Size
will it be possible to add other fonts?
(I used "mqtt import" but after waking up (sleep mode) but he did not download data...)
(I used "mqtt import" but after waking up (sleep mode) but he did not download data...)
- Attachments
-
- oled 128x32.jpeg (146.41 KiB) Viewed 21757 times
Re: add new SSD1306 OLED Display Size
You can add fonts yourself, uing the online font generator: http://oleddisplay.squix.ch/#/home
You have to replace some font names in the code and the font file and then recompile.
You have to replace some font names in the code and the font file and then recompile.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: add new SSD1306 OLED Display Size
I've used agency as a font for the wiki templates with logo. Might consider specifying the official font?
https://www.letscontrolit.com/wiki/inde ... late_Files
Just a suggestion
https://www.letscontrolit.com/wiki/inde ... late_Files
Just a suggestion
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: add new SSD1306 OLED Display Size
Not sure if that font will look nice when rendered on a low res display without anti aliasing pixels.
Will have to try and render letters like "a", "m", "n", "r" and "p"
The upper case letters should not be a problem I guess.
But if there's a better looking font, which also includes the euro sign and all the other supported characters, I am all open for suggestions.
N.B. the current included font does not support the euro sign.
You have to use the v3 font generator.
Will have to try and render letters like "a", "m", "n", "r" and "p"
The upper case letters should not be a problem I guess.
But if there's a better looking font, which also includes the euro sign and all the other supported characters, I am all open for suggestions.
N.B. the current included font does not support the euro sign.
You have to use the v3 font generator.
Re: add new SSD1306 OLED Display Size
so.. there is no chance to use it https://github.com/olikraus/u8glib/wiki/fontsizeTD-er wrote: ↑26 Feb 2018, 21:41 You can add fonts yourself, uing the online font generator: http://oleddisplay.squix.ch/#/home
You have to replace some font names in the code and the font file and then recompile.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: add new SSD1306 OLED Display Size
I think it would cost too much in memory size.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: add new SSD1306 OLED Display Size
I added only two on the previous photo (nodemcu + lua)
a nice feature would be the option to add a font (two different ...) - no need for compilation It's stupid:)
Maybe the possibility of resizing ? 2x 3x ? for each row..
Re: add new SSD1306 OLED Display Size
Those look nice, but I am not sure it is easy to convert these to the font usable by the OLED display.7keys wrote: ↑27 Feb 2018, 22:37so.. there is no chance to use it https://github.com/olikraus/u8glib/wiki/fontsizeTD-er wrote: ↑26 Feb 2018, 21:41 You can add fonts yourself, uing the online font generator: http://oleddisplay.squix.ch/#/home
You have to replace some font names in the code and the font file and then recompile.
The added size may be a bit of a concern, since it will probably add to the flash size, which is already reaching practical limits for OTA flashes.
It is possible to add other fonts, but we're kind of limited to the font generator I already linked.
Dynamically adding fonts would involve quite a lot of effort. Compiling them in the current code isn't that hard.
But then there are probably many other fonts people like.
So maybe we could make it easier for people to add it themselves. I will think about it.
-
- Normal user
- Posts: 125
- Joined: 28 Feb 2018, 07:40
- Location: Melbourne, Australia
Re: add new SSD1306 OLED Display Size
I think this is the critical part. Currently the 128x32 display is not very useful with the available font.
Is it possible to change the title of the thread to include 128x32?
Friends with kangaroos and some time koala rescuer.
Re: add new SSD1306 OLED Display Size
How can I make the font size bigger? I have 2 lines of text so can I make 1 line of text take up 2 rows so its bigger font?
Who is online
Users browsing this forum: Google [Bot] and 37 guests