Animation on 8x8 LED Matrix

I’m able to use the image: config to successfully load images onto this small LED matrix.

But animations don’t seem to work. Here is my config. I confirmed that fireworks.gif is properly loaded onto the filesystem and that it works in a web browser locally.

animation:
  - file: "fireworks.gif"
    id: fireworks
    type: RGB24
    resize: 8x8

display:
  - platform: addressable_light
    id: led_matrix_display
    addressable_light_id: led_matrix_light
    width: 8
    height: 8
    rotation: 180°
    update_interval: 16ms
    lambda: |-
      // Draw a 🍕
      //it.image(0, 0, id(pizza));
      // Shoot some 🎇
      id(fireworks).next_frame();
      it.image(0, 0, id(fireworks), COLOR_ON, COLOR_OFF);

Any ideas what might be going on here? Maybe it’s stuck on the first frame of the gif?

2 Likes

In case anyone else comes across this same issue, changing the type: to RGB565 did the trick!

It’s really awesome, icon-style gifs render beautifully on even a small LED matrix.

Another tip - if your GIF is too fast just put the next_frame into it’s own separate interval: block:

interval:
  - interval: 0.1s
    then:
      lambda: |-
        id(fireworks).next_frame();
1 Like