Any tips on outputting a BMP to an LED strip?

I'd like to output a BMP to a long LED strip, in abstract form. Its mostly just to use the color palette. Looking around the web I'm seeing a lot of people working on the issue, but not finding any sketches. Wondering if anyone might have any tips?

I found this hint, from Parsing images from SD - General - Particle , where someone says they've seen a sketch that does this, but there's no further clues:

"I found an arduino sketch that pre-processes .bmp images in rows and writes the data back to the SD. It then reads the pre-processed SD file and sends stips to a neopixel array. That approach keeps the memory requirement low since most of the work is done in the SD buffers. So there are many ways of doing this and finding the one that works is the trick."

Wondering if anyone might have any advice?

You'll find a good description of the BMP format here:

http://paulbourke.net/dataformats/bmp/

It's quite easy to parse the data yourself and in my opinion it's not necessary to pre-process the data onto the SD card again. What type of BMP files do you expect? 24bit full-color data?

What type of BMP files do you expect? 24bit full-color data?

Ideally full color. I'm working on the lighting for an art project spaceship, you can see a quick video of the current lights here:

I thought that instead of trying to program a pattern that is tasteful and non repetitive, I could have it cycle through pictures of space objects. So the lights are always showing the pallette of some picture. For example, a picture of Mars:


I could of course simplify the pictures, so they only have the sections that have interesting pallettes.

Ideally it would progressively scan through the bmp, like a pan, so the lights would be fading and transitioning smoothly.

I don't see why you would introduce the reading of images into that project. I believe that you won't see a difference between displaying your mars picture and just simply fading the LEDs randomly. It's probably better to create interesting algorithms that let the LEDs light up in some "choreography" instead of blinking through the lines of a picture.

pylon:
create interesting algorithms that let the LEDs light up in some "choreography"

Interesting idea! One that immediately springs to mind is the classic "Mandelbrot Set". The LED strip could display a vertical section of an interesting part of the Mandelbrot space, and then animate as the vertical section scans slowly in the horizontal plane. The Arduino would calculate the colour at each point using the Mandelbrot equation (which involves some heavy floating point maths... but at least the calculation will only have to be performed for a few tens to a hundred or so times).

http://www.cs.princeton.edu/~wayne/mandel/gallery/

Paul

blue_spiral-thumb.png

How big are the bitmaps and how big is the array of LEDs?

This sounds like a little ambitious for a li'l ol' Arduino.

...R

Thanks for the advice everyone. I wound up using a Raspberry Pi, which is obviously a better fit for this kind of processing.

I wound up using a Raspberry Pi, which is obviously a better fit for this kind of processing.

What type are the LEDs you're controlling? WS2812? In that case the Raspberry Pi is definitely not better fitted. It has much more processing power and might be a good controller doing your image processing and the like but to control WS2812 stripes you better stay with the Arduino.

Sorry I should have said, using ws2801 LEDs. Was awesomely easy with the pi, using the Occidentals distro.