Left for archival purposes.

User avatar
By pracas
#10757 Hi,
I've just added a basic OLED Library for the 0.96" I2C OLED Displays that come with the Address 0x3C (hardcoded!)
Its build with modified code from the adafruit arduino library and this i2c_oled library

/* Usage Notes
Works only with i2c 0.96" OLED Displays with Device Address 0x3C - Hardcoded Device ID
Does Default Setup Automatically
oled.setup(sda,scl) => Sets up the Screen uses default 0x3C i2c device address for 0.96" Cheap OLED Modules
oled.clear() => To Clear Screen
oled.line(line number, font size, "text to be printed" ) // Font Size can be 1 or 2
oled.print(x,y, font size, "text to be printed" ) // Font Size can be 1 or 2
oled.invert(val) // val can be 1 or 0
*/

Let me know how it goes

Cheers,
Pracas
Attachments
Added Left / Right Scroll // oled.scrollright(starting row, ending row) // oled.scrollleft(starting row, ending row) // oled.stopscroll()
(285.51 KiB) Downloaded 450 times
02-Apr-2015 - Corrected Upside Down Problem & Recompiled with the Latest NodeMcu Firmware
(285.4 KiB) Downloaded 434 times
Last edited by pracas on Thu Apr 02, 2015 7:08 am, edited 2 times in total.
User avatar
By alonewolfx2
#10766 Can you share your code? Maybe we can handle ic2 address things.
Edit: some basic information and usage.

your heap is 18320 for st-ap mode, 20452 for station mode, 19936 for ap mode.

you have 7 line and 20char per line for "font size=1"
you have 4 line and 16char per line for "font size=2" but you must to use line=0,2,4,6.
for ex: oled.print(0,0,2, "0123456789012345" ) code is working correctly but oled.print(0,0,2, "012345678901234500" ) not displaying correctly.