I wanted to use this little display: "DIYUSER 0.5-inch OLED LCD screen white CH1115 small screen 48*88 display"
It goes under a lot of names, commodity Chinese whatever.
Could not find any support, except for a library that assumed access to CD and C/D lines etc etc.
Anyways I wrote an Adafruit_GFX derived class that works for it and I didn't end up using the display but figured someone else might need a little startup/guidance so here.
CH1115_driver.cpp (4.8 KB)
CH1115_driver.h (1.5 KB)
I don't have the patience/time right now to turn it into a full-blown library, but if someone else wants to let me know. This is really quite a simple skeletal implementation to get you going.
-Curt
@tinker_curt
Do you have a link to a datasheet of the device?
only found this preliminary - https://www.orientdisplay.com/wp-content/uploads/2021/02/CH1115_Datasheet.pdf
You could publish it on GitHub so people can add / propose improvements.
One first proposal for change:
In the constructor, place address before twoWire parameter.
It is more likely that the address is different than that another I2C bus is used.
That's all I found too, and what I used to fill in the class. One of the reasons I posted this was because I was so frustrated at how little info there was on this chip and how hard it was to write 10 lines of init code :P
Oh yeah it needs a bunch of stuff to be "complete", great note on the I2C address, duh.. I plead "too much coffee"
I would fill in some missing methods, I could actually implement dim() the instruction set supports it, heck I set it in the init code.
Really just slammed with projects/work/family and I knew this would be a rabbit hole if I published it in any formal way. filling in the gfx overloads, implementing scrolling, coding examples..
If I check back on this topic in a month and no one has done anything with it I'll probably find a spare couple of hours, just right now my plate is overflowing.
-Curt
There is a nice Zen proverb: You should sit in meditation for 20 minutes a day, unless you're too busy; then you should sit for an hour
(variations exist about walking in the forest, on the beach etc)