kwartzlab makerspace

Aug
21

Project: Make LoLShield Awesomer

By

I’ve been working on making the LoLShield work as a visual attraction, grab attention and showcase us to the world. The LoLShield is a 14×9 LCD display created by which is capable of making the Arduino do impressive things for a low cost & complexity. Unfortunately, my designs are grander and need more pixels.

I think I’ve found a way to do that with a single LoLShield, and it’s embarrassingly simple to do. My goal is to display an image on the LoLShield of an arbitrary size, without compromising quality or readability.

4915230394]

The display shows only a small piece of the image at a time, but moves the image around, to let the viewer mentally assemble the image.

There are 2 parts to the code – a Processing app which encodes the image for the Arduino, and the Arduino app itself which renders the image on the LoLShield. The image is currently hard-coded, but a future version will allow the image to be loaded over a serial port.

For the following files, remove the “_.txt” extension to use the files with Arduino & Processing.

Arduino code:

https://kwartzlab.ca/wp-content/uploads/LOL_Image_Kwartzlab.pde_.txt

Processing code:

https://kwartzlab.ca/wp-content/uploads/ImageBitmapperForLOLShield_Kwartzlab.pde_.txt

Logo:
Kwartzlab Logo
Things I’ve learned:
- It took about 10 hours to write what was ultimately about 50 lines of code. Ugh. Welcome to software development.
- I can`t just assume there’ll be a steady stream of data from the computer when sending the image. I need to rethink how I’ll read the image in, which’ll be a future update.
- Running out of memory is a pain in the butt, especially when the space available is so small – I can’t even use 350 bytes in standard memory space, or the program will act totally unpredictably.

To do:
- Be able to send image run-length data across the serial line, and dynamically.
- Optimize the device code. Right now rendering the top-left is much quicker than the bottom-right, on the order of milliseconds (which is a lot)
- Implement grayscale. I’m thinking of adding 1/3 white, 2/3 white for a total of 4 states. I’ll have to identify each run-length, as I can’t assume it to be any other colour. To get these effects, I’ll have to flicker the LEDs the appropriate level.