Award
Congratulations CochranRobotics, 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.

Learning Ez-robot Scripting

Assistance Requested

Help bhouston 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.

bhouston claims to have checked these sources:
 
#1

I received my new EZB v4 and my developers kit a couple of days ago. Nice stuff!
I plan to convert my robot from it's current OS over the EZ-Robot. This will be challenging as it has 26 servos, a camera and a PIR sensor.

I have been working on a couple of EZB scripts and I have been successful in getting a robotic finger to move, using the "Auto position", Yahoo.
I am having trouble programming in what is required for voice commands in the "Speech Recognition" window. Is there a video or explanation of how to do this somewhere?

Thanks

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

1) Have you done voice training on your PC (to respond to your voice)?
2) Have you checked out the online learning section here on how to use voice rec and scripting?

3) Each control has a ?... when you click on it, it will take you online here for info on that particular control...

It is very difficult to explain what you want to do... Kind of like asking how do you build a car... Where does one start?.... For one thing, start with simple commands in the speech rec control like "Robot how are you" then in the corresponding script type in ... Say("I am fine, how are you?"Winky.... This is a start..... and simple enough to get you started....

#3

Hey Richard thanks for your help.
Here's what I'm trying to do;
I want to use a voice command to move a servo, ie. Robot close finger. My Microphone and speech recognition is configured and working properly.
I don't understand what I have to enter in the "settings" for the Speech Recognition, or is that where I put that in?

#4

The "settings" for SR are EZ-Scripts.

The simplest method would be to create the frames in the auto-position control and use the ControlCommand() script command to control the auto-position control.

ControlCommand() and all other script commands are explained in the EZ-Script Manual

Also, it may pay to check through the Example Projects in EZ-Builder. There are Example Projects for every control and every script command. These should help show you what they do.

#5

The first box (line) in the voice rec control is your command that you speak... By default I think it says Robot move forward or something like that.... You can delete that and try typing in (without the quotes) "Robot close fingers" .... After that, In the box next to it is the script you want to run when you speak that phrase... So you could write something like ... servo(D0,150)....

What this does is when you say Robot close fingers, servo D0 will move to position 150....

The 2nd line another voice command and the adjacent script..... and so on....

#6

Thanks Rich and Richard R.
@Richard R I did as you suggested and put in my Voice command and the desired servo movement and it worked!.
When I put in an "Action" I have created It does not work, it tells me I haven't "passed 2 parameters". How do I get an Action to respond to a voice command?

Say Richard R, what part of Canada are you from?

#7

You have typed something in wrong if you are getting the "passed 2 parameters" error... check your syntax....

I live near Kitchener, Ontario...

Glad your making progress, keep experimenting... you'll get it.... Smile

#8

Hi, still can get the voice command to work for an "Action", here's what I've tried;

In Settings for Speech Recognition, under the Phrase Tab I have put - Move finger - and under the Command Tab, I have put - Servo(D0,90) and that works when I say the command - Move Finger;

I have made an "Action" and named it - move - and when I put - move() - in the Command Tab it doesn't work. and I get "Error line1; unknown window ControlCommand(); move"

What am I doing wrong?

#9

ControlCommand("Auto Position 2", AutoPositionAction, "Move"Winky

The first parameter is the name of the auto position control you have. The last is the name of the action.

#10

Thanks d.cochran, that worked! Now to get the camera to track something, this will be fun! Standby I'll probably need help with this too!