English 日本語
ll

Go to Movie Page for bigger screen.

GoTalk Lite TutorialFStep 4.Controlling Motors

Here you will learn how to program an interaction controlling a motor on your robot with your voice.

You can also download the entire tutorial in PDF form .

Also see the movieshowing how to do every steps in this tutorial.

rr
ll

GoTalk Lite
Tutorial

Tutotial Top
Installation
Preparation
Overview
Step1.Try Example Interaction
Step2. Creating Interaction
Step3.Reacting to Sensor Input
Step4.Controlling Motor
Step5.Make robot ask you
rr
ll

GoTalk Product Info


Product Overview
GoTalk LEGO Mindstorms NXT
Tutorial
Lineup Comparison
Download
GoTalk Community
Blog
rr
ll

More About GoTalk


FAQ
Customer Support
GoTalk Adacemic Program
For parents
About Us
AGILINGUA Company Website
Contact Us
rr
ll

Step 4: Controlling the Motors through Your Voice :
gMove Fasth gMove Slowh

This step shows you how you can control the motors on your robot through your voice.

1. Open the file created in step 3. (Step1.dlgxml)

2. Add a new dialogue.

Click on the New button.

A new dialogue Dialog 3 appears left to the Delete button.

3. Add Your Speech Sentences to the Dialogue.

Add two input sentences to this dialogue: "Move slow" and "Move fast" .

4. Add a variable

Depending on the input sentence, we want the motor to move slow or fast. The speed of the motor is stored in a variable. Variables are managed in the variable box. The functionality of the variable box is identical to the variable box in the Lego Mindstorm software that can be reached through the "Edit / Define Variables" menu.

In the variable box, create a variable:

Change the name of the variable to Speed and its type to Number:

5. Associate variable values with Your Speech

If the user says 'move slow' you want the motor to turn at speed 50, if the user says 'move fast' we want the motor to turn at speed 100. To do so, you need to create variable assignments that assign these values to the variables. Click on the sentence 'move fast' in the Dialog box, then create an equation in the equation box:

Then, set the name of the variable to 'Speed' and its value to 100:

Now, every time the user says 'move fast', the value of the variable Speed is set to 100. Repeat the same steps to set the value for the variable Speed to 50 when the user says 'move slow'.

6. Add a motor command

In the command box, select the motor command:

After you selected the motor, the window shown below will appear.

Then now you can test the dialog by clicking a Robot Connection Command, either With Cable or With Bluetooth. When testing, you can observe the variable values in the variable list:

Next is the final step. Step5 shows how to program for making your robot ask you back and make a right action accordingly.

rr