repaper / gratis

EPD Source codes and Documentation
238 stars 132 forks source link

not enough space on Mega2560 #55

Open shirish47 opened 7 years ago

shirish47 commented 7 years ago

I am using pervasive display 2.7 inch thermo_270.ino for EPD_231_G2 I get following error is:

`Sketch uses 15382 bytes (6%) of program storage space. Maximum is 253952 bytes.

Global variables use 12138 bytes (148%) of dynamic memory, leaving -3946 bytes for local variables. Maximum is 8192 bytes. Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint. Error compiling for board Arduino/Genuino Mega or Mega 2560.`

how do I resolve this?

shirish47 commented 7 years ago

I have commented all lines in program and everything it seems that EPD_GFX G_EPD(EPD, S5813A) is taking this much space itself.

I really want to use EPD_GFX library for text.

shirish47 commented 7 years ago

ok I found out those buffers are too big in size for MEGA.. is there any way to use EPD with text on mega? or BLE nrf51822 on arduino platform?

hxw commented 7 years ago

It would take significant code changes, and the addition of an external SPI RAM for the graphics buffer to use this in graphics mode.

The alternative would be to have a character based frame buffer + a fixed width bitmap font and do the lookup as the image is being transferred, this would not use the graphics library but would directly render the bitmap to the panel. The disadvantage would be that only a single size of font would be possible, it would basically be an emulation of an old style tty display.