0

graphing sound to external neopixel strip?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

graphing sound to external neopixel strip?

by elo5077 on Mon Nov 05, 2018 11:34 pm

Hi all,

I'm currently working on an art project and I'm having difficulty graphing the neopixels so that they will visualize sound levels in makecode using circuit playground. I can see how one could graph sound level input to the on board neopixels, but any ideas on how to graph sound to an external neopixel ring? Thanks for your input.

-elo5077

elo5077
 
Posts: 9
Joined: Thu Aug 16, 2018 12:57 pm

Re: graphing sound to external neopixel strip?

by elo5077 on Tue Nov 06, 2018 12:08 am

For all that are interested...I actually figured this out about 20 min after I made this post. I'm including the makecode example that shows how to turn a 24 LED neopixel ring into a sound visualizer.

https://makecode.com/_23xcap8Xuhdb

elo5077
 
Posts: 9
Joined: Thu Aug 16, 2018 12:57 pm

Re: graphing sound to external neopixel strip?

by adafruit_support_bill on Tue Nov 06, 2018 6:49 am

Nice! Thanks for posting your results.

adafruit_support_bill
 
Posts: 70055
Joined: Sat Feb 07, 2009 10:11 am

Re: graphing sound to external neopixel strip?

by elo5077 on Tue Nov 06, 2018 10:54 am

One thing I'm still having issues with (based on the makecode example I posted), is setting the neopixels on the external ring to a single color. I'm instructing the circuit playground to make all of the pixels one color on start, but I dont see why this isn't working for the graph? Any ideas?

elo5077
 
Posts: 9
Joined: Thu Aug 16, 2018 12:57 pm

Re: graphing sound to external neopixel strip?

by adafruit_support_bill on Tue Nov 06, 2018 11:03 am

I don't see anything in the documentation on that. Let me check with the MakeCode experts.

adafruit_support_bill
 
Posts: 70055
Joined: Sat Feb 07, 2009 10:11 am

Re: graphing sound to external neopixel strip?

by elo5077 on Tue Nov 06, 2018 11:14 am

Great. Thank you!

elo5077
 
Posts: 9
Joined: Thu Aug 16, 2018 12:57 pm

Re: graphing sound to external neopixel strip?

by johnpark on Tue Nov 06, 2018 2:23 pm

That graph block is a black box that has the color baked into it, there isn't a way to chose your own colors. The upside is that it's a very simple way to get a quick result, the downside is not too much control.
In order replicate the graph functionality with custom colors, you'll need to cook up a similar behavior from a series of blocks.

johnpark
 
Posts: 212
Joined: Wed Mar 25, 2009 2:15 pm

Re: graphing sound to external neopixel strip?

by elo5077 on Tue Nov 06, 2018 2:43 pm

I thought that might be the case. Thanks for checking up on this.

elo5077
 
Posts: 9
Joined: Thu Aug 16, 2018 12:57 pm

Re: graphing sound to external neopixel strip?

by elo5077 on Wed Nov 07, 2018 11:46 pm

So, I've made a little progress with visualizing neopixel patterns via sound. I'm still a bit confused as to why it isnt recognizing the specified pixel colors that I have assigned on start. I had similar problems when experimenting with creating ranges. Here is the code Im working with thus far. Thanks!

https://makecode.com/_LLDUK0chP4Aj

-elo

elo5077
 
Posts: 9
Joined: Thu Aug 16, 2018 12:57 pm

Re: graphing sound to external neopixel strip?

by elo5077 on Thu Nov 08, 2018 2:57 pm

- I should also note that I currently do not have a capacitor connected to the pixels. I'm curious if including a capacitor might help with the issue.

elo5077
 
Posts: 9
Joined: Thu Aug 16, 2018 12:57 pm

Re: graphing sound to external neopixel strip?

by kevinjwalters on Tue Nov 13, 2018 1:20 pm

It's not what you are after but for another example of a custom NeoPixel graph in MakeCode, have a look at Distance Measurement with Ultrasound: New Graph v2.

kevinjwalters
 
Posts: 130
Joined: Sun Oct 01, 2017 3:15 pm

Re: graphing sound to external neopixel strip?

by elo5077 on Tue Nov 13, 2018 2:12 pm

Thank you! I'll check this out.

elo5077
 
Posts: 9
Joined: Thu Aug 16, 2018 12:57 pm

Please be positive and constructive with your questions and comments.