e-paper GDE021A1 display #892
Replies: 37 comments
-
Posted at 2016-07-31 by @allObjects Nice work...! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-07-31 by @gfwilliams That's great! Thanks for posting up! Would you mind if this got made into a proper module and put on the website at some point? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-01 by MichaelPralow module is in the works :-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by Wilberforce For the sake of brevity - it looks like there are quite a few constants that are not used! You could also shorten - @gordon - does the google closure compiler automatically do this - can the code above get passed through and then re-pretty printed to make it human readable again? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by @gfwilliams The closure compiler won't shorten any publically available names. Best thing is to make That way your could is easy to view and modify, and small. The only downside is that to add to it, you'd have to change the file itself rather than just adding a prototype. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by MichaelPralow i thought to be clear about the attached javascript in the first post, it is not a proper module, just an example which one can use to start, right now i am working on a code version which is more in line with a real module coding-style
i started with porting the complete SSD1606 diver specification, which provides a lot more than just displaying some values
for a proper module i thought of using
is that ok? as a newbie i am not aware of e.g.
i started with http://www.espruino.com/Writing+Modules and will - when it's functional - apply http://www.espruino.com/Performance Are there more places to get hints on best practices for programming Espruino? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by @gfwilliams I'm not really sure what the plan is with I think really the goal is to ensure that the minimizer can actually totally inline the constants and then remove Having extra constants doesn't matter at all as long as they can get minimized away, in fact it's probably handy for people later on. I think the Writing Modules and Performance pages are about all there is right now. To be honest the code you had already looks really good. Things that'd make it a bit more efficient...
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by MichaelPralow
to change from
to
thanks for the hints, i will implement them Graphics Instance Is that possible with the arraybuffer Graphics instance? I will try it at home, last time it did not work for me. ps: afaik the Graphics instance would work with an Array with size 12384 (172*72) which is 4 times larger than my version with size 3096 and i guess it would send 12384 bytes instead of 3096? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by @gfwilliams
Ahh - I definitely wouldn't do that... it's probably less confusing to just write the actual number in there :) The first option (well, just
Yes, totally - it's made for exactly this kind of thing. There are even options for some of the really bizarre pixel ordering that some displays use :)
or:
should do it... Then just use Try drawing a diagonal line first (it usually helps to see what's wrong :). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by MichaelPralow here is the code provided as module, after some tests with the 3-wire SPI mode i will write the module.md documentation and create a pull request major changes
Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by MichaelPralow and an example for using itAttachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-02 by MichaelPralow @gordon we can now use modules from NPM, what is the preferred way to release and provide modules, NPM or Espruino webpage? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-03 by @gfwilliams Thanks - looks good! Shame about the constants though - must have taken you ages to inline them, and it's something that the minifier would have done for you just by changing Super minor, but it looks like A pull request via Espruino's GitHub is still definitely the preferred way... Then people can find stuff just by searching the site for something like 'epaper'. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-03 by MichaelPralow
Javascript IDE Atom to the rescue :-)
good catch, i already changed that locally
ok, but it is definitely worthwile to think about NPM, at least for maintaining a module (test, versioning, own github repo, ...) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-03 by @gfwilliams
Yes, we need to come up with a good solution. It's a hard balance between being totally friendly to new users (having a 'curated' list of non-duplicated modules that are searchable, well documented and 'just work') and being totally open for anyone to publish whatever they want, with versions and stuff like that. There's also this issue of having NPM modules be nicely usable with the Web IDE - things like @chalkers is working on some tools that should make Espruino easier to use in a more Node-style way (there's also |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-31 by MichaelPralow project keeps going :-) attached to this post is a quick photo from my latest work on a nice looking font for this e-paper display
Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-01 by @allObjects Looking great. Question: when you you have to update the display, do you need to update always the whole display, or can you choose an area? - Rectangle? Like your Kickstarter number 0288! (I know, it is not your Kickstarter ID or 'Rang', but the Pico looks like to be from Kickstarter. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-01 by MichaelPralow
technically you always need to send the complete display data (3096 bytes for GDE021A1) (see Page 35 of GDE021A1 specification afaik when you take the power off the internal ram looses all data, maybe you could work without powering off (using deep sleep and SW reset or no reset at all) for me it is not worth the hassle... but i saw a circular wearable e-paper which looks perfect for an own Espruino low power smartwatch, maybe i try to create my own driving circuit
i got my Picos via Gordons Tindie storefront :-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-01 by @allObjects
...so it was one if the first kickstarter batches that had 'physically' broken corners... for a great deal with no issues though... and your's is looking pretty good... from what I can tell from the pic.
This puts additional stress on the memory of Espruino... On the other hand, it is well supported by the Graphics object... and constraints usage to static display (not much interactive ui flavor). May be later model will come up with a partial refresh... because that would be cool... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-02 by ClearMemory041063 Great work! You might use this module to store the fonts in EEROM on the chip. http://www.espruino.com/FlashEEPROM Some code examples using arrays are discussed here. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-05 by @gfwilliams Looks great! If you're happy to play around in C, another option might be to add antialiasing to the existing Graphics library? You could then use the vector fonts? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-05 by MichaelPralow
as in problems with size or problems with overall usage (frequency of read/write processes)?
according to http://www.pervasivedisplays.com/FAQRetrieve.aspx?ID=43359 :
.
hmm i am not sure that would be a good move, if we add anti-aliasing (4 colours or 16? just in time calculations?) it will be bigger and afaik nobody asked for anti aliasing until now what i am after is a better documentation for creating own fonts (in the works) and maybe one additional bitmap font with a greater size |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-06 by @gfwilliams Well, it could antialias in whatever the bit depth is - it wouldn't actually be noticeably slower when working off arraybuffer graphics. It's not a big deal but I thought that was one of the reasons you wanted the custom font (>1 bit colour?). To create your own font, you could use this and an image containing the characters in a grid: https://github.com/espruino/Espruino/blob/master/scripts/create_custom_font.js The process isn't well documented, but basically you have one array of bytes which is the widths, and the other array is just a series of 1 bit bitmaps one after the other (not aligned) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-29 by Vanderlin I am trying to get this example working the espruino WiFi board - has anyone had any luck? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-29 by @gfwilliams There shouldn't be any big differences - you've got all the wiring correct? The only gotcha with that example is that you have to type |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-09-29 by Vanderlin N/M - got it working :) PINS are...
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-10-26 by MichaelPralow i couldn't work further until now - we got a new family member - a daughter :-) i would like to take a look into
after some hours of Google "research" i did not found resources to start into programming (or better understanding) anti-aliased vector fonts do you have any hints where to start? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-10-26 by @gfwilliams Congratulations! On Espruino the fonts are just stored as polygons, and are rendered with code like this: https://github.com/espruino/Espruino/blob/master/libs/graphics/graphics.c#L394 Basically you'd want to modify
What you'd need to do is store the minimum and maximum values fractionally (maybe just by multiplying by 16), and then when you went to draw the scan line, you'd draw the points you needed to the beginning and end in the correct colour. In fact you might want to make sure the polygon fill algorithm take arguments of 16x size as well. The gotcha is that at the moment Espruino isn't aware of colour at all - it just takes a number and copies it into the next pixel so it doesn't know what R,G and B are. Since you only care about greyscale you could just treat the colour as a number though. Having said all that, your display is 72x172 pixels right? It might be easier to just use a 1 bit graphics buffer of twice that size in each direction, and to then scale it down by half - making each 2x2 square into single 2 bit pixel. You could do that with JS initially and see what it looks like. You could probably get it relatively quick using some hacky binary arithmetic to work on groups of pixels at once - or you could look at adding some convenience function in C that would take an ArrayBuffer and then squish it down in 2D. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-10-27 by MichaelPralow big thanks for the hints |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-10-27 by @gfwilliams No problem - to be honest the double-size image is probably going to provide you with the best image quality, and it'll be a bit easier too. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-07-30 by MichaelPralow
for some projects i use a GDE021A1 e-paper display like this one: http://smart-prototyping.com/NOA-Labs/E-ink-E-paper-new-version-display-module-3.3V-2.04-inch-177x72.html
the provided resources - display specification, display driver specification and some arduino example code are really good, combined with the Espruino documentation i was able to get it running fast
i attached the javascript for anyone who wants a quick start
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions