
aliusa
USA
Asked
— Edited
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
You can find out more about the EZ-Script editor and how to use it in this tutorial: http://www.ez-robot.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.
Code:
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
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
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
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: http://www.ez-robot.com/Community/Forum/Thread?threadId=5681
Alan
Breakout hack Video