If I use the doublebuffered mode, can I get a reference to the buffer that is currenty visible
I'm afraid not - the doublebuffered mode stores two buffers on the LCD itself, but the LCD is write-only, and doesn't allow copies within itself - so it's just not something that can be done.
I'm not quite sure what you're planning, but for stuff like this I'd recommend trying to create an offscreen buffer with Graphics.createArrayBuffer. You'd have to use a lower bit depth and/or resolution to get it in memory, but once you have that you can then read data from it. In the most recent firmwares there's even a blit function to allow you to copy between areas in the same buffer
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm afraid not - the
doublebuffered
mode stores two buffers on the LCD itself, but the LCD is write-only, and doesn't allow copies within itself - so it's just not something that can be done.I'm not quite sure what you're planning, but for stuff like this I'd recommend trying to create an offscreen buffer with
Graphics.createArrayBuffer
. You'd have to use a lower bit depth and/or resolution to get it in memory, but once you have that you can then read data from it. In the most recent firmwares there's even ablit
function to allow you to copy between areas in the same buffer