-
This is semi related to this question but slightly more basic.
How does Bangle.js compare to other smart watches using espruino. This is a repo that has many different unofficial boards running smart watch environments. But how do they differ from Bangle.js.
It looks like its mostly made in javascript without having this optimized C base code that Bangle.js has?
-
So i haven't fully tested this, but this is the intended way i was going to get around the idea of somebody trying to draw something when the pin is busy.
This will only stop one draw that was added too quickly. Since its still using the same image buffer. But its primarily there just so it doesn't crash the board.
SSD16xx.prototype.flip = function() { if(this.unInit == true){ return this.init().then(()=>{ return this.flip(); }); } if(this.busyPin.read()){ return new Promise((resolve)=>{ setWatch(resolve, this.busyPin, { repeat:false, edge:'falling' }); }).then(()=>{ return this.flip(); }); } this.scd(0x4E, 0); this.scd(0x4F, [0,0]); if(this.partialTran == true){ this.partialTran = false; this.scd(0x26, this.g.bw.buffer); this.scd(0x24, this.g.bw.buffer); } else{ this.scd(0x24, this.g.bw.buffer); } if(this.display.coloredDisplay){ this.scd(0x4E, 0); this.scd(0x4F, [0,0]); this.scd(0x26, this.g.cw.buffer); } return this.refreshDisplay(); };
-
I'm very interested to see what you end up doing. I'm interested to know what your actually queuing. Since i don't know if many microcontrollers can queue many image buffers.
But i would recommend making this built on top of the driver instead of being part of the driver. Since this is a e-ink display. So there's is a high probability that there not refreshing the display fast at all.
-
I don't entirely understand what your trying to build?
I'm guessing the end use would just make a "settimeout" function for the drawing function and from a list of object to draw to the screen. If its doing a full redraw then don't do anything for this itteration of the loop.
But this queue mechanism is it built into the screen driver or ontop of it?
-
-
-
-
-
-
-
So it interesting. In your example the quick refresh works. But the buffer is transformed on the x plane? So the texted looks weird, well on my screen. So if you just uncomment out the fast flash the text goes back to normal?
var screen = exports.connect(screenSettings); screen.hwReset().then(() => { return screen.init(); }).then(() => { screen.g.clear(0xff); return screen.g.flip(); }).then(()=>{ return screen.setFastRefresh(); }).then(()=>{ console.log("last check"); //screen.g.bw.setColor(0x00).fillRect(50,50,150,150); //screen.g.bw.setRotation(3); screen.g.bw.setFontVector(40); screen.g.bw.setColor(0).drawString("Hello",0,0); return screen.g.flip(); }).then(()=>{ console.log("did the flip"); })
-
-
-
-
I guess it could replace the SSD1606 module as well?
Thats kind of the goal. It "should/want" it to work with many of the SSD16xx devices in a general form. But i'm guessing it would be best to leave the SDD1606 up for backwards support.
I plan to make a pull request when i have all my e-ink screens work properly.
I also need to figure out the best way to show known configurations. In the SDD1606 library it was planed to have all the configurations in the library code itself. But the LUT tables can be fairly large, like 150+ bytes. That's potentially for each different display driver. So i don't know if its best to put that into the library as code or have like a readme where they can paste there configurations for there given display.
-
https://github.com/espruino/Espruino/blob/master/boards/BANGLEJS2.py#L168
Its labeled as UNKNOWN_0C. Any reason why?
-
So I updated the code here with your changes and this is the result i got. Now the display updates without a full refresh, but only partly. Does yours look perfect. Also how did you find that LUT table and some of the other info. The datasheets are extremely bad.
For me this video gave me a lot more info on how these work.
https://www.youtube.com/watch?v=MsbiO8EAsGw
https://gist.github.com/brendena/154afdffb2355c1cc845b67c6c258dbe
-
-
-
-
I posted my module here if you want to see what it looks like
Merge request
exports
https://github.com/espruino/EspruinoDocs/pull/708
my repo here
https://github.com/brendena/EspruinoDocs/tree/SSD16XX