Tuesday 10 September 2013

e-Paper!!! You can't get much more retro than paper.



Now we are talking retro!

I have been playing with some e-ink panels from embedded artists. I will make two versions of the retro runner readout (one with LED 7-segment displays and one with e-paper).

I bought two of embedded artists 2.7" e-paper panels.

These are great but there was a minor issue with the software for them. Dynamic content required a buffer of 5808 bytes but my Arduino Pro Mini (like the Arduino Uno) only has 1 or 2 kB of SRAM.

The issue was that a pair of entire panel size buffers is allocated in the EPD_GFX object -- a more memory-efficient way is to reduce to a single buffer and allow for sub-parts of the buffer to be updated in serial.

In fact, if we get carried away we can make it so that we only use a single line buffer and iterate across every line. I got carried away:




That code takes the pair of 5808 byte buffers and reduces it to a single 33 byte buffer.

What it does is execute the "drawing" code on each segment (each line in the case above) and only applies the pixels that are in that segment. This is obviously very wasteful on processing cycles (as we are calculating every pixel many times) but MCUs are about trade-offs aren't they? We can even rewrite over a few segments (a few of the boxes and the text "Across" do that).

Here is a sample with 16 line segments (update of the "thermo" demo from repaper):





These changes and looping code were made against the repaper repository code on github at https://github.com/brodykenrick/gratis.

No comments:

Post a Comment