Bangle.js screenshots #3742
Replies: 10 comments
-
Posted at 2021-06-11 by rigrig Nice, and using |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-06-11 by @gfwilliams
The LCD in the Bangle is write-only, with no offscreen buffer (there's not enough RAM). It's a shame, because otherwise it would have been trivial to get screenshots! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-06-11 by @fanoush actually the st7789 has read functionality, at least with SPI it worked for me some time ago on P8 watch, when checking datasheet (e.g. https://www.crystalfontz.com/controllers/Sitronix/ST7789V/ ) there are timing diagrams of both write and read operations also for the 8bit mode - page 52. Can be tricky and may not be worth it for getPixel due to speed (or maybe yes) but for making screenshot it could be used. Or is there some unidirectional level shifter/buffer between nrf52 gpio and lcd so that those 8 data pins cannot be switched from output to input temporarily? EDIT: oh maybe the RDX pin is not available. The diagram shows while writing you toggle WRX pin (which may be the the pin_sck in BANGLEJS.py)but there is also separate RDX pin to allow reading and that one may not be connected :-( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-06-14 by @gfwilliams
Sadly I think that is the case :( Every IO on the nRF52 chip is accounted for at https://www.espruino.com/Bangle.js+Technical I guess it could be on the IO expander, but I can guarantee that the original firmware didn't use any other IOs I'd love to be proven wrong though, so if you do find a way to make it work let us know! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-01-08 by diego Hi, on a follow up, here's the script for the bangle.js2 with adjustments to the dimensions:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-01-09 by HughB Hi @diego - on Bangle 2 you just type g.dump(); in the left hand side of the IDE and it does a screenshot really quickly, its built in. Sorry to bring that news :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-01-09 by diego Well, ain't that something? And so much faster! Somehow I missed that, thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-01-10 by myxor Would be great to have that available as a button on the Web IDE to make it more visible for users. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-01-10 by diego I agree, or maybe using the keyword screenshot on the documentation, a search for bangle/espruino + screenshot could only find this forum post. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-01-10 by @gfwilliams I'll add a heading called 'screenshots' to the Bangle.js 2 page - that should then go into the keywords when people search |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-06-11 by @gfwilliams
We finally have a way of doing screenshots! I'm interested to see what you think, but if you paste this code into the IDE:
And then, assuming your app has a function called
draw
that redraws the entire screen, you callscreenshot(draw)
in the IDE, you should get a screenshot.It's very slow - you're looking at multiple minutes per screen because it's having to re-render the image for every line of pixels.
Still, it is a way of getting screenshots out of Bangle.js!
Beta Was this translation helpful? Give feedback.
All reactions