Rainbowduino - show animation

So I’ve been tinkering with the rainbo2ino, and managed to get some code running on it,
but Im completely lost regarding how to show animations.
How can I translate pictures into buffers???
Does anyone have a sample code that shows how do it,
and how to display 2-3 frames using rainbowduino+ledmatrix?

I’ve found a very useful arduino library for the tlc5940
http://code.google.com/p/tlc5940arduino/
but obviously it doens’t work with rainbowduino.

The library also contains an AnimationCreator.class that automatically translates pictures into frame buffers,
it would be really useful to have something like this for the rainbowduino too!

If anyone can adapt the library and the AnimationCreator.class to the rainbowduino,
it’d be really useful for all the non hardcore programmers…

Muchas gracias,
kk

as of current versions (or at least the ones im running, heh) the images displayed are stored on the rainbowduino.

i have some ideas but nothing working yet on getting images, or rather complete states, over to be displayed rather than relying on stored images. mainly the rainbowduino is controlled via i2c and you just tell it what to display. It seems possible to tell it what to display by sending it the actual image, or device state, but im sure the refresh rate would be severely limited.

I’ve been tinkering with converting animated GIFs to Rainbowduino animation data for a while, and made a “rainbowconverter” program. It’s a bit rough but it works, pretty much: code.google.com/p/rainbowduino-tools

You need Processing from www.processing.org to run it, and a GIF animation library for Processing (link is in rainbowconverter.pde). It loads an 8x8 animated GIF that you select and generates a C file that you can then paste into data.c. I included a Rainbowduino demo that loads the (rather boring) animation and plays it forwards and backwards. All the code that you need to display the animation is in the main loop() section of the demo.

Let me know if any of this makes sense, it’s kind of late in the evening here. :slight_smile:

Man you’re an angel sent by the god of geeks to ease our pain…
I’m gonna try this and make some videos,
post the link when they’re up.

T H A N K Y O U S O M U C H
love,
kk

Thanks, I uploaded a new version that saves to a .h file rather than a .c file, which saves all that cutting and pasting.

Let me know if you find a GIF animator that works well at 8x8 though. The only one I could find was Ulead GIF animator which kind of works but is a pain to use at that size.

ive written a .net app that can create gif’s at 8x8. right now it only generates static (its what made my avatar pic) but could possibly be adapted to do other stuff.

basically it goes pixel by pixel and tells what color to write, then writes that frame.

Hello Dave!
I’ve been experimenting with your tool and it works perfectly.

To create the animated gif, I made a patch in Max/msp using some noise and fractal generators,
and then export everything to a 8x8 video.
Here’s my workflow, maybe can be useful to share it, to help unexperienced people like me:
(I’m on OSX but you can find GIF-able programs easily on pc,
like Ulead GifAnimator or Adobe ImageReady with CS2)


1- First step: get the video you want to put in the matrix (oh, really?) ,
note that, given the low resolution, it can be challenging to find something that renders nicely on a 8x8 matrix…

2- Then using Graphic Converter (good old app from the 68000 MacSE times and still kicking ass!!!)
http://www.lemkesoft.com/public/content/index.cGlkPTg4.html
you can convert the movie to a gif:
It’s really easy, and you can also scale and apply image transformations to all-frames at once.
Just open the .mov file, go to window->movie and convert movie to gif frames.
Then save the gif with all the options in the save window deselected, just plain gif.

3- Use Dave’s great Processing applet and get the .c file., or the .h file if you’re using rainbowconverter0.3.

4- Finally paste the .c code in the data.c file, inside the “animdemo.pde” Arduino sketch,
(or just link the created .h file in the main sketch if you’re using the rainbowconverter0.3)
and upload to your rainbos.
Note that you can’t upload more than about 100 frames, due to the 16kb memory of the AT168.
To gain some Kb, you can strip out from the animdemo.pde and data.c files
all that is not necessary for the frame animation:
I2C WIRE library, numbers and chars definitiions,
I think I got almost 11Kb space to store frames now.

I can go from video to matrix in less than 30 seconds,
and that’s really something I would have never managed to do without your help,
thanks a lot Dave!!!

One big limitation is the flash memory of the ATMega chip in Rainbowduino:
with 16Kb I can store about 100-120 frames, that’s 3-4 seconds of video.
For the next editions of rainbowduno, please put a bigfatass micro, at least a 1280,
with 128Kb you could have about 30" of video… the 10$ would be worthwhile for me.

Another solution would be to pass the images from Arduino via I2C bus,
as referred in the rainbowduino manual, but I need some enlightment to accomplish this:
this guy ThreeFN is making a replica of the DaftPunk helmets, and has implemented the frame-via-I2C shit,
making some modifications to the I2C Wire library I think:
http://www.thedaftclub.com/showpost.php?p=137903&postcount=2477
He says he can get 20fps via I2C due to the 100kbs bus limitation, but there’s a way to get fullspeed 400kbs.
Anyone feels like making a public and commented code to accomplish this fullspeed frame-via-I2C?
it would be sweet!

THANKS A LOT for all your help,
all the best,
kk