GIF frame – IOS app

My first idea was to add a ESP8266 to the GIF frame, so that I could control it remotely. But I haven’t had much success when tinkering the it. I can not get it to run a webserver without it freezing up.

But I had a Bluetooth Low Energy (BLE) laying around – Yes, I have a lot a stuff laying around ūüôā
I had bought it a while ago, but didn’t really got into code in Cocoa Touch for iOS- also I didn’t want to pay 100$ for the¬†developer subscription – which was needed for you to get the app on the iPhone.

But¬†with the latest release of xcode, you can install your own apps on your iPhone without the subscription!¬†So everything kinda came together for this project ūüôā

The BLE device communicates with a serial port, and can talk directly to the Arduino.
I just need some small adjustments to the menu code – adding software serial. (and I included a power on/off option, while I was at it)

Download: GIF frame

And here it is:

GIF frame – software

The software for the animated gif frame, consist of 3 parts.

  1. code for the Arduino, that reads the sd-card and displays it on the ledstrips (main board)
  2. code for the Arduino, that runs the LCD menu (menu)
  3. 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