OLED 128x32 - library modification?

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
michap
Posts: 323
Joined: 26 Mar 2013 10:35
Contact:

OLED 128x32 - library modification?

Post by michap » 23 Jun 2018 13:12

Hi,

somebody have already tried the ZUNO_OLED_I2C lib with smaller OLED?
(same controller SD1306 - but instead 128x64 - 128x32)

Or, any hint, where to modify the size in the lib?

Thanks!
Michael

michap
Posts: 323
Joined: 26 Mar 2013 10:35
Contact:

Re: OLED 128x32 - library modification?

Post by michap » 23 Jun 2018 23:31

Found it out myself ;)

Will publish a modified library, if interesting.

Michael

User avatar
PoltoS
Posts: 4836
Joined: 26 Jan 2011 19:36

Re: OLED 128x32 - library modification?

Post by PoltoS » 24 Jun 2018 08:53


Soundmanbe
Posts: 3
Joined: 01 Sep 2018 23:30

Re: OLED 128x32 - library modification?

Post by Soundmanbe » 23 Sep 2018 20:14

Hi Michap,
Your library is the one I'm looking for, with the 128x64 one, on my 128x32, the result is not really good ;-)
Can you send me it or a link to download it ?
Kind regards,
Pierre

michap
Posts: 323
Joined: 26 Mar 2013 10:35
Contact:

Re: OLED 128x32 - library modification?

Post by michap » 23 Sep 2018 20:46

I'm in this week not available - will upload lib in next week.
Michael

Soundmanbe
Posts: 3
Joined: 01 Sep 2018 23:30

Re: OLED 128x32 - library modification?

Post by Soundmanbe » 25 Sep 2018 15:15

Thanks :)

User avatar
PoltoS
Posts: 4836
Joined: 26 Jan 2011 19:36

Re: OLED 128x32 - library modification?

Post by PoltoS » 26 Sep 2018 22:19

We were notified that there is an update of the Arduino OLED library: http://www.rinkydinkelectronics.com/library.php?id=79

May be someone from the community is interested to port new features to Z-Uno OLED lib? ;)

Soundmanbe
Posts: 3
Joined: 01 Sep 2018 23:30

Re: OLED 128x32 - library modification?

Post by Soundmanbe » 03 Oct 2018 13:48

Hi Michap, any update ?

michap
Posts: 323
Joined: 26 Mar 2013 10:35
Contact:

Re: OLED 128x32 - library modification?

Post by michap » 03 Oct 2018 14:24

Hi,

attached my modified lib with sample sketch.
Use oled.begin(32) for the 128x32 pixel OLED.
There are no major changes in the lib - only the fillRect() function and parameter settings were modified.
For 128x64 oled.begin() or oled.begin(64) can be used.

@PoltoS: the update you told of the Arduino OLED library is working with buffer -I think not for default usage.
Maybe I will check it and we can do an alternate lib with less free RAM for the project in result.

Best regards
Michael
Attachments
OLEDFontDemo_32-64.zip
modified OLED lib - added 128x32pixel support.
(5.75 KiB) Downloaded 26 times

perjar
Posts: 47
Joined: 08 Apr 2018 18:02

Re: OLED 128x32 - library modification?

Post by perjar » 10 Feb 2019 16:28

Sharing two modifications:

1. Swedish national characters in SmallFont.

The extended character set is located above 127 in the ASCII table so what I have done is simply to extend the SmallFont definition in the ZUNO_OLED_I2C.cpp file and added the bitmap for our 6 additional Swedish characters. All other positions in the list are set to SPACE.
To note: oled.print() does not work for the extended character set for reasons beyond my comprehension. The workaround I am using is to use oled.write(ascii_value) to print the special character.
Example:
Code that does not work:

Code: Select all

oled.print("Önsketänkande"); // Won't work. 'Ö' and 'ä' will be printed as '  ' (two space characters each)
What you have to do is this:

Code: Select all

oled.write(214); // The letter 'Ö'
oled.print("nsket");
oled.write(228); // The letter 'ä'
oled.print("nkande");
Attached is the modified ZUNO_OLED_i2C.cpp file along with a simple design tool for 6x8 fonts I've made in Ms Excel. Feel free to use and share any character you design.

2. Added the SPACE character to the Numbers24 font.
You will find the updated ZUNO_OLED_FONT_NUMB24.cpp attached. The fix is quite simple: I have changed the font table so it starts at ascii value 32(dec) which is the space character.

it would be great if the baseline library could be expanded accordingly.
Attachments
OLED font updates.7z
(17.2 KiB) Downloaded 18 times

Post Reply