I bought some of these displays. I use the U8x8lib.h library for them. It works fine in text mode , but the library is missing a function to display bitmaps (generally drawBitmap or drawXBMP). The function exist for a dozen of drivers, but not for HC1105, is there anybody aware of a workaround?
Just tried to use U8g2lib. Here is the of compilation report. Last line is explicit.
/home/pfeuh/Documents/sources/C_language/arduino/_project/LFOx4int/LFOx4int.ino: In function ‘void printShape()’: LFOx4int:157:13: error: ‘class U8X8_SH1106_128X64_NONAME_HW_I2C’ has no member named ‘drawBitmap’; did you mean ‘drawTile’?
*Utilisation de la bibliothèque U8g2 version 2.28.10 dans le dossier: /home/pfeuh/snap/arduino/50/Arduino/libraries/U8g2 *
*Utilisation de la bibliothèque SPI version 1.0 dans le dossier: /snap/arduino/50/hardware/arduino/avr/libraries/SPI *
*Utilisation de la bibliothèque Wire version 1.0 dans le dossier: /snap/arduino/50/hardware/arduino/avr/libraries/Wire * exit status 1 ‘class U8X8_SH1106_128X64_NONAME_HW_I2C’ has no member named ‘drawBitmap’; did you mean ‘drawTile’?
He prefers drawXBM() which has methods for Flash and SRAM.
Current Adafruit_GFX style libraries have several drawBitmap() methods.
A hardware library that inherits from Adafruit_GFX gets all the current features.
Some hardware libraries implement native “compatible” GFX functions instead of inheritance. This often means that they miss some newer GFX features.
That’s exactly what I wrote. But I don’t know how to say more clearly that this function doesn’t exist for the SH1106 driver, nor in U8g2lib, nor in U8x8. FOr the rest, you’re totally right, 64x64 pixels, monochrome and stored in sram. Here is the code.testOldGraphix2.ino (4.0 KB)
You make my day, I’ve copy-paste your first version, it works on my system. But for your second version, which is the one I would like to use because my bitmaps are in program memory, I don’t find the Adafruit_SH1106_kbv library, the Arduino IDE library manager doesn’t show it.
I just got it on Github, and it works as I expect, a big thumb up for you! Cherry on the pie, this driver doesn’t seem to have the 1kbyte of buffer in sram.
David, despite the name of the lib (U8x8), I haven’t found any font in 8x8 pixels, like these for vintage computers… Am I wrong?
Using the lib’s font closer to 16x16 used in examples, it seems that it’s a little bit too big in width, lines 2 and 3 have some pixels (only last pixel column, I suppose) at the start of the following line.
I’ve got many problems attempting to mix bitmaps and text. I also gave a lot of time trying to understand the adafruit GFX library. I came to the conclusion that I probably have to write my own minimalist driver.
I have understood (I hope I’m not wrong) that most of methods works with the 1k ram buffer and the method .display() copies the ram to the display().
I haven’t found the code of this command .display(), do you know something about it? Ideally, I miss 2 methods: Display initialization and sending of one byte to the display.
I professionally wrote some code (drivers and applications) before my retirement, including this one.