Marc's Public Blog - Arduino Hacking


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Computers | Dining | Diving | Electronics | Exercising | Festivals | Flying | Halloween | Hbot | Hiking | Linux | Linuxha | Mexico | Monuments | Museums | Outings | Public | Rc | Sciencemuseums | Solar | Tfsf | Trips



>>> Back to post index <<<

2018/07/13 AnimatedGIFs for SmartMatrix or NeoMatrix (Neopixel/WS2812B) from SDcard or SPIFFS, on Teensy 3.x, ESP8266, or ESP32
π 2018-07-13 01:01 in Arduino
This is about https://github.com/marcmerlin/AnimatedGIFs (which recently added FatFS support)

Louis Beaudoin published a gif decoder for arduino, which was designed for SmartMatrix and Teensy, and used for the Aurora Project. It also required an sdcard since Teensy does not have onboard flash usable for an onboard filesystem (unlike ESP8266/ESP32).

With his encouragement, I took his code, and ported it to my FastLED::NeoMatrix library which allows using neopixels as matrices. I later added Smartmatrix::GFX Support to allow using the same GFX API to talk to both NeoMatrix and RGBPanel backends
I also added support for SPIFFS and FatFS on ESP8266 and ESP32 (built in flash memory filesystem on ESP chips, which allow working without any sdcard at all).

Here is the resulting code: https://github.com/marcmerlin/AnimatedGIFs

You can look at AnimatedGifs for the keys that are supported over serial port.

If "I just want to to display a GIF on my NeoMatrix", then I direct you to SimpleGifAnimViewer.ino which is a mere 60 lines of code if you remove the comments.
If you are ok including one more file, you can do it in 10 lines of code instead, see SimpleGifAnimViewer2

If you'd like to use the faster FatFS (over SPIFFS) there is a Makefile to generate img.ffat. See Using FatFS FFat on ESP32 Flash With Arduino for how to generate a FatFS image on your linux computer.

Here is an example video and pictures of NeoMatrix 32x32 and RGBPanel 64x64:








Here is a version running on a 64x64 RGBPanel backend with 2 different kinds of diffusers:


Enjoy, Marc


More pages: August 2023 June 2023 May 2023 March 2022 January 2022 December 2020 March 2020 January 2020 May 2019 April 2019 March 2019 January 2019 July 2018 May 2018 April 2018 January 2018 June 2017 April 2017 January 2017 February 2016 January 2015 September 2013 January 2012 December 2011 May 2011 January 2011

>>> Back to post index <<<

Contact Email