MyroOverview

MyroOverview - Myro Overview Below is a chapter by chapter...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
329 Myro Overview Below is a chapter by chapter summary of all the Myro features introduced in this text. For a more comprehensive listing of all the Myro features you should consult the Myro Reference Manual. Chapter 1 from myro import * This command imports all the robot commands available in the Myro library. We will use this whenever we intend to write programs that use the robot. initialize(<PORT NAME>) init(<PORT NAME>) This command establishes a wireless communication connection with the robot. <PORT NAME> is determined at the time you configured your software during installation. It is typically the word com followed by a number. For example, "com5" . The double quotes ( " ) are essential and required. beep(<TIME>, <FREQUENCY>) Makes the robot beep for <TIME> seconds at frequency specified by <FREQUENCY> . getName() Returns the name of the robot.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Myro Overview 330 setName(<NEW NAME>) Sets the name of the robot to <NEW NAME> . The new name should be enclosed in double quotes, no spaces, and not more than 16 characters long. For example: setName("Bender") . gamepad() Enables manual control of several robot functions and can be used to move the robot around. Chapter 2 backward(SPEED) Move backwards at SPEED (value in the range -1.0…1.0). backward(SPEED,SECONDS) Move backwards at SPEED (value in the range -1.0…1.0) for a time given in SECONDS , then stop. forward(SPEED) Move forward at SPEED (value in the range -1.0. .1.0). forward(SPEED,TIME) Move forward at SPEED (value in the range -1.0…1.0) for a time given in seconds, then stop. motors(LEFT,RIGHT) Turn the left motor at LEFT speed and right motor at RIGHT speed (value in the range -1.0…1.0). move(TRANSLATE, ROTATE) Move at the TRANSLATE and ROTATE speeds (value in the range -1.0…1.0). rotate(SPEED) Rotates at SPEED (value in the range -1.0…1.0). Negative values rotate right (clockwise) and positive values rotate left (counter-clockwise).
Background image of page 2
Myro Overview 331 stop() Stops the robot. translate(SPEED) Move in a straight line at SPEED (value in the range -1.0…1.0). Negative values specify backward movement and positive values specify forward movement. turnLeft(SPEED) Turn left at SPEED (value in the range -1.0…1.0) turnLeft(SPEED,SECONDS) Turn left at SPEED (value in the range -1.0. .1.0) for a time given in seconds, then stops. turnRight(SPEED) Turn right at SPEED (value in the range -1.0. .1.0) turnRight(SPEED,SECONDS) Turn right at SPEED (value in the range -1.0. .1.0) for a time given in seconds, then stops. wait(TIME) Pause for the given amount of TIME seconds. TIME can be a decimal number. Chapter 3 speak(<something>) The computer converts the text in <something> to speech and speaks it out. <something>
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/26/2012 for the course CS 1301 taught by Professor Staff during the Fall '08 term at Georgia Tech.

Page1 / 12

MyroOverview - Myro Overview Below is a chapter by chapter...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online