ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

PRO
Belgium
#2  

hi thanks merne sorry late respons.

PRO
Belgium
#3  

what does this mean.dont find it. error line 14

User-inserted image

#4  

@merne,

thank you for the link, never saw that tutorial until now.:)

#5  

@Nomad,888Edit*** It means you have not added a $SoundValue in the Sound Servo. in rich's example he has soundvaule you should have $SoundValue in the variable name in the Sound servo config.

Change it to $SoundValue

User-inserted image

#7  

@NEWAGETOMY , You welcome

Nether have I until Nomad asked, I never had a need before.:D

PRO
Belgium
#8  

hi merne&tomy

ah so simpel and i did not see it.thank you.

PRO
Belgium
#9  

so the led works when i speak into a headset mic.i can see jd mouthled lid up. but thats not the effect am looking for.am looking for the led to lid up when jd speaks .

#10  

I thought you did that already with a sound servo controlling the LED? Or did you just wire an LED to the speaker of your JD before?

#11  

@Norman, I do not have a JD so I don't know, but... Am guessing you are using the built in speaker on the EZB controoller. Use the servo Servo (EZB Playback) not the Sound Servo.

If so just change the variable name from $soundvalue to $Soundv4Value in your script.

Example... if ($Soundv4Value < 10) $pwmvalue = 0 ELSEif ($Soundv4Value < 20)

Change it to ... if ($EZBPlayingAudio < 10) $pwmvalue = 0 ELSEif ($EZBPlayingAudio< 20)

in your script.

PRO
Belgium
#12  

ah thanks i will try that.

PRO
Belgium
#14  

what value comes here? i have a led on port D22.

User-inserted image

#15  

Nothing goes there, it's a variable name representing the value of each PWM value listed above.

PRO
Belgium
#16  

ah ok. so this works only with headset mic.

PRO
Belgium
#17  

sorry to bring this up again. chould the led connected to port d12 as in pic d22 flikker on the ritme of speech? when a audio is payed?

PRO
Belgium
#18  

got some movement.

are these pics correct ?

User-inserted image

User-inserted image

PRO
Belgium
#19  

i forgot the video,here a little video from the sound servo.

#20  

It looks like you mastered the servo Mic, but did you want the LED to go out when your talk?

PRO
Belgium
#21  

hi justin i mean the led must go on when he speaks.

#22  

Here is something different I did to experiment. I added the Sound servo (PC Speaker), which gives me the variable $soundvalue for anything that is played through my computers speakers. I don't actually use it for controlling a servo, I just wanted it to detect the PC speaker sound output.

I then used my RGB animiator display in my JD (Spock) and created 3 different static display for a KITT (Knight Rider) type voice display (the 3x3s don't make a good KITT display, but that's not important.

I just wanted to see if I could use the Sound servo PC to make the RGB "dance" to music and I can.

If the value is less than 10, I set the display to blank. Kitt1, Kitt2 and Kitt2 represent brightness levels for my animation display pattern.


:loop

if($soundvalue &lt; 10)
ControlCommand(&quot;RGB Animator&quot;, AutoPositionAction, &quot;Blank&quot;)
#print(10)
Elseif($soundvalue &lt; 20)
#print(20)
ControlCommand(&quot;RGB Animator&quot;, AutoPositionAction, &quot;Kitt1&quot;)
Elseif($soundvalue &lt; 30)
#print(30) 
Elseif($soundvalue &lt; 40)
#print(40)
Elseif($soundvalue &lt; 50)
#print(50)
ControlCommand(&quot;RGB Animator&quot;, AutoPositionAction, &quot;Kitt2&quot;)
Elseif($soundvalue &lt; 60)
#print(60)
Elseif($soundvalue &lt; 70)
#print(70)
Elseif($soundvalue &lt; 80)
#print(80)
Elseif($soundvalue &lt; 90)
#print(90)
Elseif($soundvalue &lt; 100)
#print(100)
ControlCommand(&quot;RGB Animator&quot;, AutoPositionAction, &quot;Kitt3&quot;)
endif 

Goto(Loop) 

I have commented out the Print values, those were for testing and debugging and I would recommend anyone use those to test their scripts so they can see what Sound servo controls are responding too.

What I have not adjusted yet are the Update Speed and Scalar under the Sound Settings of the Sound servo control. As anyone played with those setting much? I'd like to improve the rate the my RGB display changes state to the sound level.

PRO
Belgium
#23  

hi justin

i try the above script for the rgb.i dont understand,what chould the script doing?

PRO
Belgium
#24  

justin

is it this what the script chould be doing?

PRO
Belgium
#26  

hi justin

that sounds great.i made a project you can adjust the rgb motions if you want. there are tree rgb and 1 blank.kitt1 kitt2 kitt3.

knight rider

#27  

Hi old friend. Nice and interesting work. Well done. You taught me something today. What fun!

I think what you meant to say is that you posted your project and not that you made a plug in. No worries. Language barriers suck. LOL. :D If you did make a plugin where can I find it?

Thanks again!;)

PRO
Belgium
#28  

hi dave

i was thinking that it was wrong.thanks for the correction. see post #27 it says knight rider

PRO
Belgium
#29  

anyone

is there a script for the rgb to go on and out a the ritme off speech or sound/music?

#30  

That method via the script that I demonstrated and you also demonstrated is one way to do it. I think that is the best or perhaps only way to get it do it natively on the fly or as any audio plays from the PC. Refining it to make it perfect is hard, which is probably why a lot of people use an outside audio controller.

But if you have preset sound files pre-recorded, I think the other way is to add an audio track to an EZBv4 Sound Board (PC sound board does not have the option for edit) and use the Edit function as The Robot Program shows in Episode 034 just like making DJ dance you can alter it to make the RGB animations "dance":

PRO
Belgium
#31  

justin

ah thats why it didn work.the robot program is awesome,i chould look into it more.

PRO
Belgium
#32  

dj&justin

you gonna love this.the real knight rider .i updated the rgb visions. they are really cool.kitt 1 is also updated but in the video not to see.

#33  

Patrick, I love it! Kitt has been a favorite of mine since I was a child. His scanner has made a come back recently in the movie "Ready Player One".

PRO
Belgium
#34  

hi justin

i saw the kit car only one time in belgium hasselt.he is huge car.

PRO
Belgium
#35  

i am tinkering with the sound servo again.there is one thing i notest. when you speed up the sound servo,it just go's slower.is it possible , to ad more settings in the sound servo list for speed? like excample 0.75 0.50 0.25 will that speed up the sound servo?

User-inserted image

#36  

My LED (which is NOT infrared, I can actually SEE it flashing now) doesn't blink on and off, but instead blinks between varying levels of brightness, and then it just stays at a lower level before the EZB is finished talking.  I have its Speech Synthesis control saying "The answer to the ultimate question of life, the universe, and everything is 42.", but the Sound servo cuts out just after the "everything".

Is it supposed to be doing this, or is there some variable I'm missing?

PRO
Belgium
#37  

thanks averyone for helping this topic.

Bobsheaux

its best to stay on your topic.dj dont like it when you make multiple topics on same issue.

PRO
Belgium
#38  

bobsheaux

set the sleep higher .

#39  

...I'm sorry, I didn't know that we were supposed to stay in "our" topics. We figured out where I was messing up, I got myself some new LEDs, and now I'm looking for help on a different problem. Should I not have tried to look for help where that problem is being discussed?

PRO
Belgium
#40  

if you solved the problem.you can post it in your topic. if you have a new question ,no problem,open a new topic.

PRO
USA
#41   — Edited

Good morning Bobsheaux,

Quote:

quote: is there a window for talk servo with led?
original post "talk servo" - I use these settings, I am using D0 - you an use any port number, just connect your LED

make sure you connect you LED:

  1. Connect the LED's Anode (+) (long side) wire to the signal (white) pin D0 of the EZ-B.

  2. Connect the LED's Cathode (-) (short side) wire to the ground (black) pin D0 of the EZ-B.

Make sure you put the min 1 and the max 180

User-inserted image

User-inserted image

I made a coffee time script: - you can make any script.

SayWait("Good morning my robot crew.") sleep(60) SayWait("Are you just waking up.") sleep(60) SayWait("now that you are up.") sleep(60) SayWait("time for coffee.") sleep(60) SayWait("coffee time.") sleep(60) SayWait("come and get your 1st cup of coffee.") sleep(60) SayWait("so we can start this day.") sleep(60)

another way to use the "talk servo" - I used my "talk servo" here"

https://synthiam.com/Community/Robots/My-new-and-improved-Talk-Servo-19144

LED info is on: https://synthiam.com/Community/Tutorials/Pulse-Flash-LED-with-PWM-16230

EzAng

#42   — Edited

https://synthiam.com/Community/Tutorials/Sound-Activated-Circuits-leds-Lamps-Etc-16335 This isn't working because I can't make it stop cutting off the last few words of my phrase (making the sleep higher did nothing).

The Talk servo isn't working because I can't get it to turn off when the EZB isn't saying anything.

Why does the Sound servo only kinda-sorta work with the Speech Synthesis control, but not at all with the Bing Speech Recognition? (The Talk servo seems to work(ish) with Bing.)

In either case, the LED's too dim to see unless the robot's in total darkness (and yes, I'm using LEDs which emit VISIBLE light, not infrared).

PRO
Belgium
#43  

hi bobsheau

i can see now what you mean .my led flaches very little and dont stop.

PRO
Belgium
#44  

bobsheaux

got it.i can make a video if you want?

#45  

Lay it on me. I'm getting nowhere with my fiddling around...

PRO
Belgium
#46  

what do you need ?

1 mouth moving with speech ? 2 or lid up a led while speeking?

PRO
Belgium
#47  

bobsheaux

hope this video helps.

#48   — Edited

(Ignore the flashing eyes, they're actually staying solid, save the "blinking" every 4 seconds.)

PRO
Belgium
#49  

you are using bolt windows at same time ? and where is the script for the sound mic?. does each led has its own port?

#50  

I don't understand the first question. Which windows are you talking about? Are you implying that using multiple windows it hindering what I'm trying to accomplish, or is there something else I should be using that I'm not?

Hang on... Sound MIC script? Did you mean to ask where my script for the Sound servo is? Because I do have that in my controls, I just didn't think I needed to include that in the screengrab for the purposes of this video. This original tutorial said to have a script for the Sound Servo, but are you saying I need a script for the Sound Mic too/instead?

And yes, each LED is in its own port.

PRO
USA
#51   — Edited

hi Bobsheaux. Nomad and I have showed you many ways to use the LED, just follow instructions please:

Here is DJ's take on LED again: https://synthiam.com/Community/Tutorials/Pulse-Flash-LED-with-PWM-16230

Here is a script that works like Dave's R2 robot, on and off:

remember, you can say anything

set the servo speed to 2

ServoSpeed(d0, 2)

pwm(d0, 0)

sayezb("good morning") sleep(2000)

pwm(d0, 0)

sayezb("how are you") sleep(2000)

pwm(d0, 0)

sayezb("have a great day") sleep(2000)

pwm(d0, 0)

my  screen:

User-inserted image

talk servo

User-inserted image

open the PWM control for just on and off - slider

another script for on and off

set the servo speed to 2

ServoSpeed(d0, 0)

:loop

Set LED On

pwm(d0, 100)

wait some time for the pwm to do its ramping thing

sleep(1000)

#set LED Off pwm(d0, 0)

wait some time for the pwm to do its ramping thing

sleep(1000)

goto(loop)

Here is a script that syncs with words and shuts off after each sentence. SayEZBWait("Good evening.") pwm(d0, 0) sleep(1000) pwm(d0, 0) SayEZBWait("Almost time for dinner.") pwm(d0, 0) sleep(1000) pwm(d0, 0) SayEZBWait("Are you hungry?") pwm(d0, 0) sleep(1000) pwm(d0, 0) SayEZBWait("What are we having?.") pwm(d0, 0) sleep(1000) pwm(d0, 0) SayEZBWait("some thing lite I hope.") pwm(d0, 0) sleep(1000) pwm(d0, 0) SayEZBWait("I am still full from lunch.") pwm(d0, 0) sleep(1000) pwm(d0, 0) SayEZBWait("have a great day.") pwm(d0, 0)

I do notice I have to disconnect and connect sometimes

EzAng

PRO
Belgium
#52  

bobsheaux

for led you need only the window  servo mic and this script .

# Sound servo to PWM range Script

Author: Rich

Version: 1.0.0

Date: 25th June 2013

Variables (do not adjust)

$soundright = auto

$pwmvalue = 0

Main script

Set the start point for the never ending loop

:loop

Check the variable from the Sound servo control against a list of pre-determined levels (you may need to change these) and set the PWM value to suit.

if ($soundright < 10) $pwmvalue = 0 ELSEif ($soundright < 20) $pwmvalue = 10 ELSEif ($soundright < 30) $pwmvalue = 20 ELSEif ($soundright < 40) $pwmvalue = 30 ELSEif ($soundright < 50) $pwmvalue = 40 ELSEif ($soundright < 60) $pwmvalue = 50 ELSEif ($soundright < 70) $pwmvalue = 60 ELSEif ($soundright < 80) $pwmvalue = 70 ELSEif ($soundright < 90) $pwmvalue = 80 ELSEif ($soundright < 100) $pwmvalue = 90 ELSE $pwmvalue = 100 endif

Set the PWM with the value chosen above (you may need to change the port to suit)

PWM(D1, $pwmvalue) PWM(D0, $pwmvalue)

Add any other PWM ports above this line with PWM(PortNo, $pwmvalue)

Sleep for 100ms to avoid saturation (you may need to adjust this to increase accuracy or increase stability. Reduce the delay for better accuracy, increase for better stability)

Sleep(100)

Jump back to the start

Goto(loop)

CHECK THIS BOX

User-inserted image

PRO
USA
#53  

Great Nomad, what else can we do? lol

EzAng

#54  

Yes, I'm aware that you've shown me several ways to do this. If "just following the instructions" was all I had to do, I wouldn't be here. Something is going wrong here, and I promise you, it isn't my being difficult for the sake of being difficult.

I followed these new instructions you gave me, and I'm still running into the same problems as before; the LED's just barely flickering at random, and it doesn't turn off when it's done talking.

PRO
Belgium
#55  

hi ezang

one step at the time i gess.

#56  

Trying Nomad's latest suggestion, stand by...

PRO
Belgium
#57  

bobsheaux

do you have two pwm's in your project?

PRO
USA
#58  

Nomad, in the code above, make sure you initialize : on the top

$soundright = 0

or code  will not  work

EzAng

PRO
Belgium
#59  

hi ezang

i only changed the ports below.what means initialize ?

PRO
USA
#60   — Edited

Here is the correct code, I did change the sleep below so it would blink faster, also I am just using D0 so I # D1 out $pwmvalue = 0 $soundright = 0

code:

Sound servo to PWM range Script

Author: Rich

Version: 1.0.0

Date: 25th June 2013

modified by EzAng  August 2020

Variables (do not adjust)

$soundright = auto

$pwmvalue = 0 $soundright = 0

Sound servo to PWM range Script

Author: Rich

Version: 1.0.0

Date: 25th June 2013

Variables (do not adjust)

$soundright = auto

$pwmvalue = 0

Sound servo to PWM range Script

Author: Rich

Version: 1.0.0

Date: 25th June 2013

Variables (do not adjust)

$soundright = auto

$pwmvalue = 0

Main script

Set the start point for the never ending loop

:loop

Check the variable from the Sound servo control against a list of pre-determined levels (you may need to change these) and set the PWM value to suit.

IF ($soundright < 10) $pwmvalue = 0 ELSEIF ($soundright < 20) $pwmvalue = 10 ELSEIF ($soundright < 30) $pwmvalue = 20 ELSEIF ($soundright < 40) $pwmvalue = 30 ELSEIF ($soundright < 50) $pwmvalue = 40 ELSEIF ($soundright < 60) $pwmvalue = 50 ELSEIF ($soundright < 70) $pwmvalue = 60 ELSEIF ($soundright < 80) $pwmvalue = 70 ELSEIF ($soundright < 90) $pwmvalue = 80 ELSEIF ($soundright < 100) $pwmvalue = 90 ELSE $pwmvalue = 100 ENDIF

Set the PWM with the value chosen above (you may need to change the port to suit)

# PWM(D1, $pwmvalue) PWM(D0, $pwmvalue)

Add any other PWM ports above this line with PWM(PortNo, $pwmvalue)

Sleep for 100ms to avoid saturation (you may need to adjust this to increase accuracy or increase stability. Reduce the delay for better accuracy, increase for better stability)

Sleep(1000)

#61  

You're saying "servo mic". What is "servo mic"? I see Sound servo (EZB), Sound servo (PC), Sound servo (EZB Playback), Sound servo (PC Mic), and Sound servo (PC Speaker), but I'm not seeing any "Servo Mic". I'm trying to get the LED to respond to the speech coming out of the EZB, so which of those do I use for that?  You said that for the LED, all that I need is the script and the servo mic control, but then you say that I need to have the Sound PC v4 paused?

And I can't run the script. It's just giving me this:

Line 1: Unexpected token ILLEGAL

Again, I PROMISE YOU, I'm not TRYING to be confused or argumentative here.:(

PRO
Belgium
#62  

ezang

my script for blink is this.

pwm(d0,100) pwm(d1,100) sleep(500) pwm(d1,0) sleep(500) pwm(d1,100)

PRO
USA
#64  

Bobsheaux it is sound servo (PC)

EzAng

PRO
USA
#65  

Nomad did you see the code I pasted?

EzAng

PRO
Belgium
#66  

ezang

do you mean this?

$soundright = auto needs to be # $soundright = 0

PRO
USA
#67   — Edited

Yes

in code we initialize it with 0 - zero

$soundright = 0

Just like $pwmvalue = 0

was initialize with 0 - zero

or $soundright = auto

will work

EzAng

PRO
Belgium
#68  

ezang

thats good info thanks.

PRO
USA
#69   — Edited

You know , you can use also use:

$pwmvalue = auto

lol

All works

I guess the real question is did Bobsheaux get it?

EzAng

PRO
Belgium
#70  

ezang

no i didn know that.

PRO
USA
#71  

I use

$soundvalue = auto $pwmvalue = 0

works the best

EzAng

PRO
USA
#72  

Or a simple script to turn on and off

set the servo speed to 2 or whatever, I use 0

ServoSpeed(d0, 0)

:loop

Set LED On

pwm(d0, 0)

wait some time for the pwm to do its ramping thing

sleep(1000)

#set LED Off pwm(d0, 100)

wait some time for the pwm to do its ramping thing

sleep(1000)

goto(loop)

#73  

No. Bobsheaux didn't get it...

I'm using the Sound servo (PC) controller, I used the new script that you wrote, I've got one PWM window running... and it's STILL not working.

Line 1: Unexpected token ILLEGAL
PRO
Belgium
#74  

if you have two leds ,you chould have two pwm .

line 1 is nothing.

User-inserted image

are you using ez script or somthin els ?

PRO
USA
#75   — Edited

sorry Nomad, I did not see you

try the talk servo

use the controls I have

User-inserted image

User-inserted image

make the min 1 and the max 180

EzAng

#76  

Let's see what happens with this set-up...

PRO
USA
#77  

ok, you can do it

#78  

The Talk servo control doesn't do anything. The LED is just stuck at a constant dim glow.

I tried going back to Nomad's original set-up and thought maybe.... MAYBE my issue was that I was putting this code into the JavaScript instead of the EZ-Script section... but now I'm back to the dim, random blinking.

PRO
USA
#79   — Edited

Whatever my friend

you did change the min to 1 and the max to 180?

try everything  :-)

EzAng

PRO
Belgium
#80  

ezang

for LED its min 1 to 100 max

#81  

"Whatever my friend"? Look, I'm not blowing off what you're telling me for my own amusement. I have nothing to gain by asking for help, and then ignoring it. I just want to get this thing to work.

And yes, I've lowered it to 1 and raised it to 180. Nothing changed. I've raised the value in the script from 100 to 1000 to see if that might make it the slightest bit brighter. Nothing changed.

PRO
USA
#82   — Edited

We want to help,

can you send me a picture or video of what you are doing?

On the LED make sure:

  1. Connect the LED's Anode (+) (long wire) wire to the signal (white) pin D0 of the EZ-B.

  2. Connect the LED's Cathode (-) (short wire) wire to the ground (black) pin D0 of the EZ-B.

EzAng

PRO
Belgium
#83  

bobsheaux

can you take a new ARC project and put in 3 things.

1 sound servo

User-inserted image

2 ez script from post # 74

3 ez script whit some text .excample  sayezb(" hello my friend , nice to see you " )

4 ad the second pwm below in the script for second LED  thats all you need

#84  

EzAng The connection of the LEDs isn't the issue. I figured out the hard way that infrared LEDs aren't what we want for this kind of project, I had them replaced, and I figured out how to get them to flash like I wanted.

Nomad I started a new project, I added a sound servo mic to it, I put the code that you wrote into EZ-script, I made a new script with the suggested text, and I added the PWM (but I don't know what you mean by "in the script for second LED").

It's still flickering as dimly and randomly as it was before.

User-inserted image

PRO
Belgium
#85  

bobsheaux

you need only one script running for the leds. ad the second led in the script. what i mean with second script is what you want to say when the led is flaching.

User-inserted image

can you post a pic from your settings sound servo ?

PRO
USA
#87   — Edited

Yes please post a pic or a video

Take a screen shot (print screen)  prt sc on keyboard

copy and paste

EzAng

PRO
Belgium
#88  

ezang

i see only one pwm in his project.

PRO
USA
#89  

Nomad where is his project?

PRO
Belgium
#90  

ezang

post #84 see pic.

PRO
USA
#91  

Bobsheaux, in EZ script:  when you first open the script, just put a letter in there then delete it, now you are in EZ script

and add

Or a simple script to turn on and off:

code:

set the servo speed to 2 or whatever, I use 0

ServoSpeed(d0, 0)

:loop

Set LED On

pwm(d0, 0)

wait some time for the pwm to do its ramping thing

sleep(1000)

#set LED Off pwm(d0, 100)

wait some time for the pwm to do its ramping thing

sleep(1000)

goto(loop) Edit Comment

PRO
USA
#92   — Edited

I see you have sound servo mic -

User-inserted image

you need sound servo (PC)

EzAng

PRO
Belgium
#93  

ezang

you got somethin here. bolt saying sound servo pc ,one says sound servo speakers.

User-inserted image

PRO
USA
#94   — Edited

Here is mine under servo not audio

User-inserted image

sound servo (PC)

PRO
Belgium
#95  

ezang

do you have the latest version ARC ?

PRO
Belgium
#96  

ezang

yours is correct .

bobsheaux

ezang is correct. see sound servo pc in his pic ,post 94 . it chould work now .me bad sorry about that.

PRO
USA
#97  

So Bobsheaux, did you give up? Persevere through this.

EzAng

PRO
Belgium
#98  

ezang

am still here.;)

PRO
USA
#99   — Edited

yes I am Nomad, I am here it is only 7:43 in the evening

PRO
Belgium
#100  

ezang

do you use desame sound servo pc for moving the mouth?

PRO
USA
#101  

moving a mouth, like my Mr. Roman, I use the talk servo

EzAng

PRO
Belgium
#102  

okay thanks .i saw your video.

PRO
USA
#103  

Thank, good night

#104  

I had to go to work. I'm back, I'm going to do my best to try this again without slamming my fist through the wall...

Here's my project. 

User-inserted image

Sound servo Mic...

User-inserted image

The blocky code to tell the LED what to do.... (Port D14 is where the LED has been successfully connected, so the code is modified to incorporate port D14.)

User-inserted image

The script of a bit of test dialogue...

User-inserted image

The settings for my PWM control.

User-inserted image

I raise the slider on the PWM (which immediately snaps back into the OFF position), I hit the START button on the script controls, and THIS is the result.

It's talking, but we don't SEE it talking. And even if we COULD see it talking, it would look like THIS.

I want the talking LED to be as bright as the eye LEDs, and I want it to flash with each spoken syllable, but neither action is taking place. When it DOES work, it's stuck at a barely visible random flicker, and it continues even after the speech has stopped.

"i see only one pwm in his project." No mention of needing more than one PWM was made before now.

"Or a simple script to turn on and off:" I just tried that new script you provided.

User-inserted image

This isn't giving me the effect I want.

"I see you have sound servo mic. you need sound servo (PC)" This is EXACTLY what I've been talking about this entire time; these are the most confusing, unclear instructions I've ever read in my life. Nomad said that I needed "servo mic".  I pointed out how there ISN'T any control listed as "servo mic", that there are instead FIVE different sound servo Controls, and even after listing each one by name, all he said was "Sound Servo".  I switched over to Sound servo (PC) after you made that suggestion, and THAT didn't work either. (Post #73)

But okay.... Just for the sake of argument.... Just to show you that I'm honest-to-everything-holy TRYING here...  I'm going to re-insert the original code combined with the Sound servo (PC) control....

New set-up....

User-inserted image

Sound servo (PC)...

User-inserted image

Original LED script, modified with $Soundv4Value and D14...

User-inserted image

The final result....

sigh No... It's still too dim, it's not blinking in sync with the dialogue, and it prematurely stops blinking before the dialogue is completed.  Then again... it actually TURNS OFF when it's done talking.

I'm exhausted....

PRO
Belgium
#105  

Bobsheaux

the sync off the LED  wil not work 100% correct.you will need to try diff kinds off LED. you wil need clear LED with higher MCD .some between 500 and 1000 mcd also you can tinker a little with these settings .

User-inserted image

there is another way to get beter sync for the LED ,that is solder the wire on the pads from the speaker. any sound that comes out the speaker,the LED will flach same ritme.here a video.

this way you cant cotrole the LED itself.

PRO
Canada
#106  

Hi @Bobsheaux,

There are a couple methods in hardware that you can do. As Nomad mentioned you could use a Super Bright LED that has a high millicandela (mcd) value.

Another way to make it bright is to use a transistor and adjust the resistor so that more current gets to the LED. An LED hooked up to an EZ-B I/O port is limited to 10mA by the on-board resistor but you can still use an I/O port to control a transistor to get access to more current.

Rich wrote a great tutorial here about using a transistor to control a bulb. A TIP120 is a bit overkill for your application but you can use the same concept with a common 2N3904.

One thing to note is that with PWM you'll always want to stay near the higher percentages for your on time as that will keep the LED bright.

Come to think of it, I like Nomad's idea of using the speaker voltages to activate the LED, it would need to be attached to the amplified side of the amplifier (extra speaker pins), combine that with a transistor circuit and I think that could work well.

PRO
USA
#107  

hi Bobsheaux,

I see you have sound servo mic - wrong

under servo you need sound servo (PC)

EzAng

PRO
Belgium
#109  

hi bobsheaux

iff you take for excample a white wire and solder on the SPKR .

then connect the ezbv4 to your arc.

then touch with the wire the pins off the speaker.only one way will work.

as jeremie stated color positif or min does matter.

User-inserted image

here you see color red on the left side.but it works also with the red on the left.

its the other side of the wire thats going on the speaker that you need to test,

#110  

Okay, but how did you attach your LED to your speaker? You said you soldered it to the pads of the speaker? The soldering I understand, but what/where are the pads of the speaker? Apparently it doesn't matter in which direction you solder the wires of a speaker to the EZB, but I wouldn't think that's the case with LEDs, right? The proper position of positive vs. that of negative DOES matter, doesn't it?

PRO
Belgium
#111  

these are the pads off a speaker.

User-inserted image

it doesn matter on the ezbv4 what + or - is.

but on the speaker or LED you have to test wish wire goes where.

you can use colored wire if that easier to remember witsh color goes where.

1 solder a wire on the ezbv4 ( long enough ) see pic ptp

2 strip the wire on the other side .

3 connect your ezbv to arc

4 play sound file or sayezb

:loop

sleep(2000)

sayezb(" testing my speaker ")

sleep(2000)

goto(loop)

5 tough with the wire the pads from the speaker ,if you dont hear sound switsh sides .mark one wire so you know  wish pad it goes.

6 sound file is still playing ,now connect the LED and see if it lids up ,if not swish sides and mark one off the wire.

7 connect the wires that youve marked together ,and connect the two together that doesn is marked.

8 solder the wires on the pads or you can use one off these see pic.

User-inserted image

#112  

But where am I connecting the LED? The speaker has positive and negative terminals, you hook those up to the EZB, but where on the pads do you put the LED? I need to reiterate the point that I'm not trying to be confused or argumentative here, but it sounds like you're telling me to just put the LED anywhere and that will work.

PRO
Belgium
#113  

read number 7 in post 111

after you tested witsh wire goes where.

User-inserted image

PRO
USA
#114   — Edited

Bobsheaux, did you ever finish the LED project?

I always finish and understand a project before I go on to something else. EzAng

#115  

Man, all of this was a chore... But it's WORKING. Whew!...

PRO
Belgium
#116  

hi bob

that looks fantastic.and sounds great.

PRO
USA
#117   — Edited

looks good Bobsheaux,

Hi Nomad, how are you?

EzAng

PRO
USA
#118  

Hi Nomad,

Up to the past again - I just created again LEDs being activated by a script for sound

Used Rich's script also from the past.

wow, everything is from the past, lol

User-inserted image

PRO
USA
#119   — Edited

Here is the video for the Two Leds activated by any sound

Hey Nomad, I this is old news, but it does work