Award
Congratulations DJ Sures, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Trying To Get Led To Flicker While Sound Is Playing

Assistance Requested

Help familyman with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

familyman claims to have checked these sources:
 
#1

I am building a semi static BB8 (from Star Wars) out of foam. I have the EZb playing different sound files when a button is pressed (I have it set up for mobile, I press a button and it randomly plays one of several sound files). What I am trying to do is get it so that when it plays a sound file an LED flickers on and off while sound is playing and then stops when sound stops. I have managed to do the Sound Servo script and it works, but the LED also flickers when ever there is a external sound.
Can anyone help me out with this please.

Thank you.
Jamie
https://www.facebook.com/FoamtasticCreations/
User-inserted image

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.


Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


#2

Just noticed on the soundboard it has an edit option. Wondering if I could make a script for each sound file?. I will have to try it when my battery charges back up.

#3

You can - or you can attach an led to the speaker output.

#4

Sweet, never thought of that. I have to move the speaker anyway, so adding the LED to it would work. Awesome thanks.

#5

Credit to Patrick. A search might find it. He has a YouTube video demoing it

#6

DJ, would'nt sound servo also work for control of an LED synced with sound?

#7

Yeah - that's a good point. You could connect an led to a digital pin and use sound servo. Good idea Justin

#8

I mentioned in my first post that I tried the sound servo thing, but found that any sound even external would set off the LED. I needed it so that only the when the sound file is being played would the LED flicker. But thanks.
I am going to try putting some script in each of the sound files, that way I can control how bright the LED flickers depending on the sound file being played. Thanks to everyone for helping me out.
Jamie.

#9

Remember, there are 3 sound servo controls:

Sound Servo PC MIC - that would pic up any sound from the MIC on your PC.

Sound Servo PC Speaker - that would pic up only sounds played through the speaker.

Sound Servo EZB Playback - that would pick up only sounds played through the EZB Speaker.

I just wanted to mention that to make sure you know about the 3 different options.

#10

Just for thoroughness, there is also a talk servo control which only activates for text to speech (either Say or SayEZB). Doesn't apply in this case since you are using robot sounds, not speech,but helpful if someone looks here later.

Alan