ARC Pro

Upgrade to ARC Pro

ARC Pro is your passport to a world of endless possibilities in robot programming, waiting for you to explore.

Author Avatar
PRO
Belgium
Thingiverse
#9  

i got the tip from rich .next time use a brigher led.

Author Avatar
Gibraltar
#10  

that's cool and so simple, it took me a while to find something to flash an LED to sound, I followed this thread https://synthiam.com/Community/Questions/7173 and also found this code I can't remember where

$Soundv4Value = 100
:loop
waitforchange($Soundv4Value)
PWM(D10,$Soundv4Value)
goto(loop)

both work but yours is so easy (EZ)

#11  

@bborastero, The advantage of the script and a digital port is that you can turn it on and off based on whether the robot is speaking or playing music, but Nomad's solution has a simple elegance and avoids all of the issue with the soundservo control. (I find using the script with sound servo it goes out of sync with longer sentences).

Alan

Author Avatar
PRO
Belgium
Thingiverse
#12  

bborastero

i can use yours too.

Author Avatar
PRO
Belgium
Thingiverse
#13  

so where do you connect the led?on a digital or anoloog port?

#14  

Quote:

so where do you connect the led?on a digital or analog port?

On a digital port. Then, if using the script bborastero posted, you need a Sound Server V4 object, but you don't need to configure it to a servo (it is just to populate the variable used in the script), then create the script and start it. The LED will blink whenever the EZ-B makes sound and the script is running, and it varies in brightness based on the volume.

That example used port D10, but you can use others, just modify the PWM statement as needed.

Alan

#16  

nomad, Great work and independent thinking! Maybe it will be on the next JD? Steve S;)