Page 1 of 1

SSD1306 library/OLED screen

Posted: 15 Apr 2018 19:54
by sitevnic
Hi
I've connected OLED 0,96" screen to my Z-Uno device. It is working well with ZUNO_OLED_I2C library. However I would like to make some trend line of pressure and temperature from BMP180 sensor. I couldn't find any information how to set pixel on my OLED screen using OLED_I2C library. When I tried to use Adafruit_SSD1306 library, during verification I'm getting error compiling for board Z-Wave>ME Z-Uno.
So how can I make trend line of something, or actually just set pixel, draw line on that OLED screen?

Re: SSD1306 library/OLED screen

Posted: 27 Sep 2018 20:52
by perjar
Hi, I don't have a solution to your problem, but looking at the functions available it does not seem to pe possible. The z-uno version of the library is not at all as complete as the standrard Arduino library.

I have a question back though: I can't get my oled to work. When running the example code I can see the screen flashing for a microsecond when the sketch starts, but after that is is completely black.

How have you wired yours and have you made any alterations compared to the example code to make it work?

Re: SSD1306 library/OLED screen

Posted: 29 Sep 2018 10:36
by PoltoS

Re: SSD1306 library/OLED screen

Posted: 03 Oct 2018 14:33
by michap
perjar wrote:
27 Sep 2018 20:52
I can't get my oled to work.
It should work - without problem. You are sure that you have SSD1306 controller on display?
Some boards are working with SH1106 chip. I have got the same "wrong"...
If SH1106 - checkk my lib, it is working but need 1024bytes of RAM (because needed buffer usage)

Wired - check here: http://z-uno.z-wave.me/examples/bmp180-oled/

Michael

Re: SSD1306 library/OLED screen

Posted: 03 Oct 2018 23:29
by perjar
Thanks for your tips.

Yes I have the SSD1306 controller and it works fine when connected to an Adafruit Trinket. The wires are correctly connected, same as in the bmp180 project.

I looked into another project too, to see if I could borrow some working code: https://z-uno.z-wave.me/projects/Mercury206/

Some code snippets from the project:

Code: Select all

#include <ZUNO_OLED_FONT_NUMB16.h>
// You can use another builtin fonts for numbers..._NUMB24, _NUMB40
#include <ZUNO_OLED_FONT_RUS8.h> // Russian font
#include <ZUNO_OLED_IMG_LOGO.h> // Z-Uno logo

oled.gotoXY(24, 0);
oled.setFont(zuno_font_rus8);
oled.print("Ntvgthfnehf");   //  
oled.gotoXY(0, 1);
oled.setFont(zuno_font_numbers16);
oled.fixPrint(inst_meters[INS_METER_INDEX0(CHANNEL_THERMOIN1_MSENSOR)],1);
Where are all these ZUNO_OLED_FONT_*.h files located? How do I even know which ones exist? I can't find them at all on my computer but the compiler processes all this without complaints so apparently they do exist and so do their .cpp files.

There seems to be a lot more definitions than what can be seen in the ZUNO_OLED_IC2.h file, like setFont and fixPrint for instance. What else is there? It would be great with a consolidated documentation of the OLED library.

Re: SSD1306 library/OLED screen

Posted: 04 Oct 2018 23:13
by perjar
Problem solved. I am even too embarrased to tell what it was. :oops:

The question about the OLED libraries still stand howiever. Where are these .h files located?

Re: SSD1306 library/OLED screen

Posted: 05 Oct 2018 19:41
by michap
perjar wrote:
04 Oct 2018 23:13
The question about the OLED libraries still stand howiever. Where are these .h files located?
located in the lib directory - as sample at Windows:
C:\Users\[user name]\AppData\Local\Arduino15\packages\Z-Uno\hardware\zw8051\2.1.5\libraries\ZUNO_OLED_I2C\

Michael

Re: SSD1306 library/OLED screen

Posted: 05 Oct 2018 21:29
by perjar
Brilliant! Thanks a million!