Shield Shield Blocks Spectrum Shield Audio Input

Should I just put some extra risers on the Shield Shield to lift up the Spectrum Shield?

2 Likes

Yeah that seems like a good idea to me, what do you think @mohit?

Thanks,
David

1 Like

It worked, no surprises here.,

2 Likes

Risers should work. Just make sure its a snug fit!

Keep us posted on the progress!

1 Like

As expected, everything works with just the addition of some risers between the Shield Shield and Spectrum Shield.

I am streaming from a tablet to a bluetooth speaker which has a pass-through audio connection to the Spectrum Shield. The spark core has the drivers for the Spectrum Shield and the LED strip written into the user edited firmware (thanks to John Boxall at Tronix Stuff and @luz. Once I wrote some post-processing functions to smooth out the values read from the Spectrum Shield to be visualized, the result was magnificent!

Aside from my code being written so that the frame rate depends on the speed of the computations (rather than actual time, so more jittering for sure), it’s running great!

I will post a video tonight.

3 Likes

Here’s the video, and unfortunately my Nexus 4 phone is not quite up to the task of capturing the light. I’ve got some scrap Lexan hanging in front of a cylinder wrapped with LEDs to diffuse the light. It would be best to have a grid that had cells equidistant from each LED, but I can see this 1/8" sheet mixes the color really well.

The visualization samples a sine wave from a lookup table and draws a different color for each of the seven frequency bands from the spectrum analyzer. I had to add a baseline correction to the drivers for the Spectrum Shield and post-processing to smooth and limit the output to start to get good data for visualization. Crazy how the eyes and ears are sensitive to changes on totally different time scales (60 Hz. vs. 10000 Hz.? whoa)

Everything is done with integer and binary arithmetic and I’m looking forward to adding motions and different visualizations to arbitrary patches of LEDs on the display. I’m also looking to detect changes in the variance to detect when the song moves into a new part and change the visualization dynamically.

The Spark Core has been a champ the whole way, and the ability to move it around and update it remotely has definitely been a boon working in a limited space. :spark:!

<img src="/uploads/particle/2546/51d091db8a1846f7.png" width=“303” height="244 alt=“wave visualization, no Lexan” />

P.S. power supply is 5V/10A external supply to the LEDs then to the Shield Shield.

3 Likes

Here’s a shorter video showing a lava lamp effect by applying an “over” operator with random pseudoalpha values for the top color smoothed into patches.

1 Like

What’s the diameter of your strip? I can’t find a suitable diameter off the shelf with mine!!

@kennethlimcp I forget off the top of my head. You can see the last two LEDs are not lit, and that is because it was easier for me to tell the driver there was an even 17 LEDs on every row.
They’re adafruit neopixels (ws2812b w/silicone casing), 16.7mm long per segment, ~17 leds per row is 283.9mm circumference (A = pir^2, so C = 2pi*r ==> D = C/pi) so about 91mm diameter was enough to wrap 4m of LEDs around 14 times.

The driver @luz wrote for ws2812b on Spark Core microcontroller has variables for rows and ledsPerRow to define so you can adapt for many diameters and strip lengths.

1 Like

That’s awesome, thanks for sharing! Cool project! :slight_smile:

Thanks to everyone, s’always nice to hear a complement :wink:.

At this point I’ve got Viz objects with overloaded operators for doing set operations like “union” and “complement” with + and - and = for defining new visualizations on new patches (or translate patches around), and also Color objects with some basic blending functions built in for defining new colors, or doing things like having one color fade in/out over another color depending on frequency intensity. I pretty much just got these implemented and had to get out of town before I got a chance to play with them much, but I’m very excited by the possibilities.

Here’s a video showing the Spectrum Shield–>Shield Shield–>Spark Core going with three static Viz patches. Apologies for the repetitive techno music if that’s not your thing: https://www.dropbox.com/s/vphngktx477h5da/VID_20140710_105156.mp4

1 Like