The software for the animated gif frame, consist of 3 parts.
- code for the Arduino, that reads the sd-card and displays it on the ledstrips (main board)
- code for the Arduino, that runs the LCD menu (menu)
- code on the PC, which converts a GIF into a text file, with the color codes of the GIF.
Arduino sketch
The two Arduinos communicates via the serial ports.
At startup the main board, request the menu for the current settings. (it does this by sending a request_signal)
Serial.write(REQUEST_DATA); // request for new data - value is 155
The menu, then sends the settings in the following format
Serial.write(START_SIGNAL); // 111 Serial.write(loadNext ? 1 : 0); // next - values 0 or 1 Serial.write(menu.mode); // mode (single/slideshow) - values 0 or 1 Serial.write(menu.repeat); // slideshow duration - values 1 to 50 Serial.write(menu.speed); // speed - values 10 to 100 Serial.write(menu.brightness); // brightness - values 10 to 60 Serial.write(END_SIGNAL); // 222
Whenever a change in the menu happens, it will also send this byte array to the main board.
The menu also,saves the changes to EPROM, so that the settings can be restored when power off and on.
Download the sketch + xcode here: GIF frame
PC software
On the PC side, I used this Processing sketch, but I think i really is just Java. Kinda like Arduino sketch is C/C++.
https://github.com/MeULEDs/MeU_Square_GIF_Converter_Teensy
I modified the original code, so I only outputs the color codes, and not the Arduino sketch code.
Here is my version: GIF_Converter.pde