Most recent activity
-
using the files from https://www.espruino.com/Download as always, e.g. https://www.espruino.com/binaries/espruino_2v19_banglejs2.zip
-
-
Hey guys,
I'm trying to improve the handling of the GraphicsBuffer for my 3-color (white/black/red) ePaper display.
So the display expects all pixels for black and all pixels for red to be send with a separate command. So the way it is now setup is, that I have created 2 separate GraphicBuffers of 1bpp each, e.g.
var g_red=Graphics.createArrayBuffer(264, 176, 1, {msb: true}); var g_black=Graphics.createArrayBuffer(264, 176, 1, {msb: true});
Then I write both buffers to the ePaper using different commands:
//write red writeCommand(CMD.DATA_START_TRANSMISSION_1); for (let i=1;i<g_red.buffer.length;i++) writeData(g_red.buffer[i]); //write black writeCommand(CMD.DATA_START_TRANSMISSION_2); for (let i=1;i<g_black.buffer.length;i++) writeData(g_black.buffer[i]);
While this is working fine it bothers me, that I have 2 separate buffers to draw to. If I want to draw something in red, I have to use
g_red.drawString(...)
and for blackg_black.drawString(...)
What I was hoping for was to use a 2bpp buffer and then be able to use setColor do something like this:
var g_both=Graphics.createArrayBuffer(264, 176, 2, {msb: true}); //draw in red var g_both.setColor(red).drawString(...); //draw in black var g_both.setColor(black).drawString(...);
But now, how do I transfer this to the ePaper. It is not as easy is sending every other byte of the buffer using one of the above commands right?
When I try this, I get weird interlaced results:
writeCommand(CMD.DATA_START_TRANSMISSION_1); for (let i=0;i<g_both.buffer.length;i+=2) writeData(g_both.buffer[i]); writeCommand(CMD.DATA_START_TRANSMISSION_2); for (let i=1;i<g_both.buffer.length;i+=2) writeData(g_both.buffer[i]);
So if I understand this correctly: lets assume I want to only set the first 8 pixels of the display. When I want to set the first 2 pixels and the last 2 pixels to black, I would have to send the bit value 11000011 or 99 in decimal to the black buffer.
Now if I want pixels 3-6 to be red, I would need to send bit value 00111100 or 60 to the red buffer.
I cannot wrap my head around how this would work with a 2bpp graphics buffer though.
Hope the above is not too confusing.
-
-
do you still have the tap over the middle two pads?
Also, have you tried a different USB charger?
I pealed off the sticker for testing purposes but to no avail. I tried several charges, all of which worked just fine with the previous Bangle2. Still no luck. I probed the outer pins with my bench power supply, the watch does not draw any current. :-(
The battery has completely drained now and I can't get the watch running again. I even tried the jump start method mentioned here.
I guess luck is not on my side...
-
-
@Gordon I hate to bother you again. The replacement of my Bangle2 through @Christine worked just fine. But now I got another issue with the new Bangle2.
It does not seem to charge anymore. I only had to charge it about three times until now, which worked fine.
I checked the pins on the cable, it shows 5.09 volts across the outer two pins. But the watch does not vibrate upon connecting the cable. Also Bangle.isCharging() shows false.
I updated to 2v16 before it completely drains. I turned it off so to save some juice. Is there anything else I could be checking?
-
Or is there no feeling there at all?
No feeling at all. The button now is very light to press and does not click at all anymore. It used to work sometimes to press "at an angle" but that doesn't work either anymore.
By new watch body you mean the watch without straps right?
I'll be happy to send back the old one even in advance and I am willing to compensate for shipping costs and other expenses, just name a reasonable price. :-)
Maybe we'll continue via PM?
Many thanks!
Nah, different guy. sorry for the confusion, I just commandeered this thread. In my case it was for Bangle2. But now it works again, might have been a glitch in the DFU app.