I'm currently experimenting a bit with my Bangle.js developer device.
Does anybody know how to make a screenshot of the device and send it back to a connected PC? Graphics.asBMP/URL and Graphics.dump() do not seem to work on a Bangle.js and Graphics.asImage fails due to insufficient memory.
Thus, I'm a bit lost right now...
Does anybody have an idea?
Yeah, the display is 240x240, that would be 57k even at 8 bit per pixel color depth, almost as much as the nRF52832's 64k memory. So you can't read it back to memory in one go.
It's probably doable: read a chunk of data from the LCD's memory, push it thru BLE, read the next chunk. But it won't be fast, Espruino's effective transfer rate is about 2.6kbyte / sec.
I meanwhile managed to get screenshots from LCD modes 120x120 and 80x80, transferring them back to my PC and then converting them into PNGs.
The problem of getting screenshots from LCD modes 240x240 and 240x160 is still unsolved, though.
I just found the method Bangle.lcdWr - could that be used to read the LCD contents and take a screenshot? How would the command look like then?
I'm afraid that as far as I'm aware, it's not possible to read back from the LCD's memory. It's write-only. So there's actually no way to get a screenshot of what's currently on it. The best you could do is maybe create a new g which was an offscreen buffer, and write to that - but obviously it'd have to be a lower bit depth.
I'd love to be proven wrong about the LCD reads though. Some tech data is here: https://www.espruino.com/Bangle.js+Technical
Basically the ST7789 is set up in the 8 bit parallel mode, which would be ok for reads except I'm pretty sure that the read/write lines are hard-coded to always be set to write (although I guess it's possible they are on the IO expander).
8 bit parallel
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem