Just recieve a new 1.3" 128x64 OLED dsplay from AliExpress which was declared by sellar as SSD1306, but on package there are clear text "NEW 2021 SSD1315". It make a problem.
With Adafruit_SSD1306 library - OLED display show only black noise on white.
With SSD1306xLED library (from link above) - AruinoIDE can't compile the sketch with error.
With u8g2 library - all works excellent, but it weights too much and occupy almost 100% of Nano memory.
With LCDgfx library - works good, but library does not have banality functionality for float variables direct displaing.
Can any one help to:
A) Resolve problem with Adafruit_SSD1306 library to work correctly with SSD1315 display?
B) Minimize u8g2 library memory usage?
Any other solution?
PS BTW which of those and other graphics libraries for Arduino is a "best choise standard"?
Always check unusual displays with U8g2lib first. Oliver supports many different chips and many different displays.
I can't find the SSD1315 datasheet. Solomon are not very good with replying to requests.
Perhaps a reader has a link.
I suspect that the User registers will be identical to SSD1306
But some System registers may need different values. (these are set once in oled.begin() and never changed)
Without the genuine SSD1315 datasheet it is only guesswork.
One more problem with this display (but I'm not sure that this problem belongs to display itself), when I using:
I2C SSD1315 display with library u8g2 U8G2_SSD1306_128X64_NONAME_F_HW_I2C;
I2C TCS34725 RGB sensor with library Adafruit_TCS34725,
I recieve data from RGB sensor correctly, but display with code:
DisplayOLED.clearBuffer(); // clear the internal memory
DisplayOLED.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
DisplayOLED.drawStr(0,10,"Hello World!"); // write something to the internal memory
DisplayOLED.sendBuffer(); // transfer internal memory to the display
Shows only "Hellow V" and other part of text are fastly blinks as a white noise and dissappear.
I already read some threads about problems with dispalys with other devices on I2C, but can't resolve it.
Any suggestions?
Overall will be nice to:
or (A) Resolve problem with Adafruit_SSD1306 library to work correctly with SSD1315 display;
or (B) Minimize the global variables and memory using by u8g2 library.
or (C) Found another solution or enough powerful library.
(A) it should be simple enough to just add a few ssd1306_command() statements to setup().
(B) there are probably some low-level U8g2 commands as in (A)
(C) just inherit an existing 1306 library and let the new class's begin() perform the extra commands.
(C) is more attractive. To me anyway. The user simply includes the new super-class H file and appropriate constructor.
Whatever you do it requires an edit for any existing sketch.
Neither SPI nor I2C controllers are read-able. So you can't diagnose the controller in software.
Which means you need to hard-code a new class or a configuration macro for existing class.
How long have 1.3 inch SSD1315 been on the market?
How long have 0.96 inch SSD1315 been on the market?
(B) All threads about "how to minimize u8g2 library memory occupation" is talking about fonts minimizing, but the main problem - is too much global variables using by u8g2. Can't find any solution to minimize them.
OK, I will wait for your solution (A) - code update of Adafruit_SSD1306 to work stable with SSD1315.
I'm just a beginner, it's my first Arduino display, I don't really know it's sales history, aspecially hiddenly at SSD1306 product page! Suppose less then year, maybe 3-4 month at that shipment.
I make a tests of how much of code/variables memory allocates my sketch with each SSD1306 library:
Adafruit_SSD1306 = 60% / 32%; (! works with SSD1315 uncorrectly)
U8G2_SSD1306_128X64_NONAME_F_HW_I2C = 48% / 89%; (! too much variables memory taken)
U8G2_SSD1306_128X64_NONAME_1_HW_I2C = 48% / 48%; (+ good)
U8G2_SSD1306_128X64_NONAME_2_HW_I2C = 48% / 54%; (+ good)
LCDgfx DisplaySSD1306_128x64_I2C = 30% / 27%. (+++ best)
Thanks, with SSD1315 and Nano I will use the next library which works good and enough compact:
U8G2_SSD1306_128X64_NONAME_1_HW_I2C
U8G2_SSD1306_128X64_NONAME_2_HW_I2C
But still "LCDgfx DisplaySSD1306_128x64_I2C" library are even more memory-economy, but it absent of banality and very useful function of a direct variables displaying at screen unfortunately. I ask developer to add a such function asap.
Still after you will receive your SSD1315 display and if you can and know how - you can try to update the most popular Adafruit_SSD1306 library by your own or by contact with their developers. Suppose many will be grateful.
In which case, please quote which library, what version, which example, ...
The beauty of the IDE Library Manager is that you can roll back to an historic library version.
So if your "Adafruit_SSD1306" is different, I can install your version to replicate your problem.
I am using:
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.13\hardware\arduino\avr\libraries\Wire
Using library Adafruit_GFX_Library at version 1.10.4 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_GFX_Library
Using library Adafruit_SSD1306 at version 2.4.2 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_SSD1306
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.13\hardware\arduino\avr\libraries\SPI
Using library Adafruit_BusIO at version 1.6.0 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_BusIO
When I've open ArduinoIDE today - the notification about some libraries updating appear, so when I start this topic maybe those libraries were a previous versions, not sure.
OneWire 2.3.5
DallasTemperature 3.9.0
Adafruit_GFX_Library 1.10.5
Adafruit_SSD1306 2.4.3
SPI
But still there are some trouble with Adafruit_SSD1306 and this display. At Samples -> Adafruit SSD1306 -> examples:
ssd1306_128_64_i2c (default SCREEN_ADDRESS 0x3D) = does not display anything, just a black screen - it's differ from a previous "black noise on white screen".
ssd1306_128_64_i2c + SCREEN_ADDRESS 0x3C = display [logo + some animated lines], but most of runs animation are freezes at 2-4seconds.
OLED_featherwing + HEIGHT 64 = displaying of [logo + text] OK.
PS Also I have a problem with SD-card-reader data recording (all works, SD card displaying, files creates, but data to file does not recording with error - both problems (display freezes and SD card data record drop) now looks similar, but not sure does they linked or not.) SD card - CardInfo works, but "error opening datalog.txt" - Storage - Arduino Forum
But still there are some trouble with Adafruit_SSD1306 and this display. At Samples -> Adafruit SSD1306 -> examples:
ssd1306_128_64_i2c (default SCREEN_ADDRESS 0x3D) = does not display anything, just a black screen - it's differ from a previous "black noise on white screen".
Of course 0x3D will not work. Civilised OLEDs default to 0x3C but you can always change the address to 0x3D if you want.
ssd1306_128_64_i2c + SCREEN_ADDRESS 0x3C = display [logo + some animated lines], but most of runs animation are freezes at 2-4seconds.
Running fine on my 0x3C SSD1315 display.
It shows some graphics shapes. Scrolls horizontally. Then does an endless falling star animation.
OLED_featherwing + HEIGHT 64 = displaying of [logo + text] OK.
I guess that this example is intended for Featherwing. I don't have a Featherwing. Do you own a Featherwing?
I am happy to run any examples from any SSD1306 library supported by the IDE Library Manager.
Chinese modules are generally assembled well. Pin headers are soldered ok.
I suggest that you examine your pcb(s)
And replace the 1.3 inch SSD1315 with regular 0.96 inch SSD1306 as comparison.
Regarding your SD card. It looks as if the SD module has a level shifter.
SD cards are 3.3V devices.
It is very important to have good soldered joints. Male header strip well soldered. Dupont cables professionally crimped.
A single glitch will upset any external electronics.
Hello, David, thanks you very much for all your help!
david_prentice:
OLED_featherwing + HEIGHT 64 = displaying of [logo + text] OK.
I guess that this example is intended for Featherwing. I don't have a Featherwing. Do you own a Featherwing?
No, I just use it as one more (SSD1315 display with SSD1306 library) display test and see the correct text on the display. So in terms of displaying - it works good.
david_prentice:
Chinese modules are generally assembled well. Pin headers are soldered ok. I suggest that you examine your pcb(s)
Problem are the same at 2 similar displays.
david_prentice:
It looks as if the SD module has a level shifter. SD cards are 3.3V devices.
At this situation here is only 2 explanations:
A) My both SSD1315 displays have some nuances. My both SD-card-readers are defect.
B) Or Arduino canNOT give an enough stable power output to power up nor display, nor SD. How I can check it?