Asked — Edited

Ez-Script Focal Point

Hi Guys,

A question arised when I thought the Say command in script would make the EZB say the string but then I realized SayEZB does that. This kinda confused me.

Many of examples play the audio through my computer speakers instead of the EZB ... Is this simulated? Do I have to compile and upload to the EZB?

Links would help.

Thanks, Aliusa


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

PRO
Synthiam
#1  

On the right side of any script editor within EZ-Script is the manual of EZ-Script commands. The EZ-B is the robot controller, hence the "SayEZB()" command outputting audio from the EZ-B.

You can find out more about the EZ-Script editor and how to use it in this tutorial: https://synthiam.com/Tutorials/Lesson/23

If an example comes out of the PC speaker, it is using the Say() command and not SayEZB(). You can edit the example and change it to SayEZB() if you wish.

#2  

What DJ said....


say("I am a robot") # sound comes out your computer speakers
sayWait("I am a robot") # sound comes out your computer speakers

sayEZB("I am a Robot") # sound comes out your EZB's speaker
sayEZBWait("I am a Robot") # sound comes out your EZB's speaker

#3  

Thanks all...

So I should code for the controller if I want the script to run on the controller.

I just found the command suffix 'EZB' confusing because other commands don't have a PC version and an EZB version. They either work on the PC or EZB (like the Set command).

So a command only has an EZB suffix if it can run on the PC or the controller? Otherwise it runs on controller?

Thanks, Aliusa

#4  

@aliusa.... You maybe be misunderstanding how the EZ Robot system works... All software and programming runs on your PC or mobile device... Nothing gets download to the controller (unless you need a firmware update). It is not like an arduino at all... There is no ezb version or pc version... Simply the ezb does what the software on your PC or mobile devices tells it to and in real time. Kind of like someone controlling a puppet for lack of a better comparison... The SayEZB command simply directs the sound out of your EZB4 speaker instead of your PC's speaker...

#5  

@Richard,

That was my initial confusion, you're right. So let me try to answer my question based on the responses here...

The SayEZB command is special because you specifically directing the command to the controller's built-in speaker.

When I first started playing around with the dev kit, I thought all the commands went to the PC in some simulation mode. But then I realized you have to actually turn on the digital ports (Set(Dx, On) to actually use them:) I couldn't get the led eyes on omnibot to turn on... I was beside myself:) then after some searching on this forum I noticed the Set command and that did the trick.

Question, If I plug in an external speaker to the controller, would I have to use SayEZB or Say to get sound from it? And follow up, where would I add the external speaker?

Thanks, Aliusa

#6  

The sayezb command is not special at all... it just another command that your pc is sending to your ezb.... I think you are over thinking all of this... All commands are directed to the ezb controller, but your PC is the brains of everything... The ezb is like what I said... just a puppet... The ez bulider software tells the ezb4 controller what to do... Think remote control... You PC or Android device is controlling everything thing that the ezb does... The EZB4 would be just an expensive paper weight without your PC being connected to it...

#7  

Regarding your speaker question. Yes, if you hook up a speaker to the EZ-B you would use the SayEZB to send voice there, and the Soundboard(EZB) to send MP3 audio to it.

Two ways to wire a speaker. Directly, which uses the EZ-B amp. Can only drive fairly small speakers, and amplified, where you connect to a pair of audio line level points to an external amp.

Both are explained in this thread: https://synthiam.com/Community/Questions/5681

Alan