Nokia 5110 LCD

Hello,

I got a couple of Nokia 5110 LCD from ebay and managed to get them working together with Sumotoy library and Adafruit GFX library.

The question I have is how to display monocromatic images on it that are sent via serial?
Adafruit tutorial said that drawBitmap function "The bitmap data must be located in program memory using the PROGMEM directive. " But PROGMEM can not be changed in runtime and there is just not enough EEPROM to contain 128x128 pixel as when image is converted with LCD Assistant it takes over 13kb.

How can this be done ?

Thank you

How can this be done ?

Well, an Arduino Due has 96 Kilobytes of SRAM.

Sorry, should have mentioned Im using Arduino Nano which has 2kb of SRAM.

Sorry, should have mentioned Im using Arduino Nano which has 2kb of SRAM.

Then there is no way. I was suggesting an Arduino that could let you do what you want.

I have that display. The screen buffer is 504 bytes (84x58 /8). That fits in 2K sram.
edit: How are you doing this with a 128x128 TFT library?

The drawBitmap() function was written to access program memory. You could modify it or create a duplicate function that accesses sram instead. Or you could use the drawPixel() function in the device library.

I think a better way would be to access the screen buffer more directly, on a byte basis, as the serial data comes in. Just add a function in the device library that moves each of the 504 incoming bytes into the appropriate locations in the screen buffer. Then call display().