Arduino Nano with ssd1315 oled

Thank you for reading.
I have an oled display that uses the 1315 chip: it is the HS96L03W2C03 from LSCS (JLCPCB). HS96L03W2C03 | HS | Price | In Stock | LCSC Electronics

Having a lot of trouble finding a library that works with this oled.
Does anyone know of a library for this?
2504101957_HS-HS96L03W2C03_C5248080.pdf (1.8 MB)

I have used the U8g2 lib, however it used all memory on my Nano to function. After commenting out 90% of my code it did write to the OLED.

I am now trying the U8x8 API which seems like it's bases on the U8g2 lib but uses much less memory? EDIT: the u8x8 api writes directly to the oled, rather than using buffer RAM memory of the arduino.

EDIT: The u8x8 api worked. Hopefully this can save a lot of time and confusion.
NOTE: the constructor specifies sd1306, however this does work for the ssd1315 display driver chip.

This is the code that I added to my project.

/*

  HelloWorld.ino
  
  "Hello World" version for U8x8 API

  Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)

  Copyright (c) 2016, olikraus@gmail.com
  All rights reserved.

  Redistribution and use in source and binary forms, with or without modification, 
  are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice, this list 
    of conditions and the following disclaimer.
    
  * Redistributions in binary form must reproduce the above copyright notice, this 
    list of conditions and the following disclaimer in the documentation and/or other 
    materials provided with the distribution.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  

*/

#include <Arduino.h>
#include <U8x8lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif

// Please UNCOMMENT one of the contructor lines below
// U8x8 Contructor List 
// The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8x8setupcpp
// Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected
U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); 	      
// Notice that the above constructor specifies the ssd1306? However, it does work with the ssd1315 display driver chip that is on some of the OLEDs


void setup(void)
{
  u8x8.begin();
  u8x8.setPowerSave(0);
    
}

void loop(void)
{
  u8x8.setFont(u8x8_font_chroma48medium8_r);
  u8x8.drawString(0,1,"Hello World!");
  u8x8.setInverseFont(1);
  u8x8.drawString(0,0,"012345678901234567890123456789");
  u8x8.setInverseFont(0);
  //u8x8.drawString(0,8,"Line 8");
  //u8x8.drawString(0,9,"Line 9");
  u8x8.refreshDisplay();		// only required for SSD1606/7  
  delay(2000);
}

Sincere thanks,
TonyAme

1 Like

Thanks Tony, That was exactly what I needed too.

Great.