Difference between revisions of "Myro Commands for Various Robots"

From IPRE Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
Below is a table showing which commands work on which robots (currently the Scribbler, Roomba, and Create are included).
 
Below is a table showing which commands work on which robots (currently the Scribbler, Roomba, and Create are included).
 
 
 
{| {{table}}
 
{| {{table}}
 
| align="center" style="background:#f0f0f0;"|'''Function'''
 
| align="center" style="background:#f0f0f0;"|'''Function'''
Line 20: Line 18:
 
| turn('left', 0.5)||*||*||*
 
| turn('left', 0.5)||*||*||*
 
|-
 
|-
| turn(\'right\', 0.5)||*||*||*
+
| turn('right', 0.5)||*||*||*
 
|-
 
|-
| turn(\'straight\', 0.5)||*||*||*
+
| turn('straight', 0.5)||*||*||*
 
|-
 
|-
 
| turnLeft(0.59999999999999998)||*||*||*
 
| turnLeft(0.59999999999999998)||*||*||*
Line 40: Line 38:
 
| restart()||*||*||*
 
| restart()||*||*||*
 
|-
 
|-
| get(\'stall\')||*||*||*
+
| get('stall')||*||*||*
 
|-
 
|-
| get(\'config\')||*||*||*
+
| get('config')||*||*||*
 
|-
 
|-
 
| getStall()||*||*||*
 
| getStall()||*||*||*
Line 52: Line 50:
 
| getStartSong()||*||*||*
 
| getStartSong()||*||*||*
 
|-
 
|-
| set(\'name\', \'theName\')||*||*||*
+
| set('name', 'theName')||*||*||*
 
|-
 
|-
| set(\'volume\', \'on\')||*||*||*
+
| set('volume', 'on')||*||*||*
 
|-
 
|-
| set(\'led\', \'center\', \'off\')||---||*||*
+
| set('led', 'center', 'off')||---||*||*
 
|-
 
|-
| set(\'led\', \'right\', \'off\')||*||*||*
+
| set('led', 'right', 'off')||*||*||*
 
|-
 
|-
| set(\'led\', \'left\', \'off\')||*||*||*
+
| set('led', 'left', 'off')||*||*||*
 
|-
 
|-
| setLED(\'left\', \'on\')||*||*||*
+
| setLED('left', 'on')||*||*||*
 
|-
 
|-
| setName(\'theName\')||*||*||*
+
| setName('theName')||*||*||*
 
|-
 
|-
 
| setVolume(0)||*||*||*
 
| setVolume(0)||*||*||*
 
|-
 
|-
| setVolume(\'off\')||*||*||*
+
| setVolume('off')||*||*||*
 
|-
 
|-
 
| setVolume(1)||*||*||*
 
| setVolume(1)||*||*||*
 
|-
 
|-
| setVolume(\'on\')||*||*||*
+
| setVolume('on')||*||*||*
 
|-
 
|-
| set(\'led\', \'back\', 1)||*||*||*
+
| set('led', 'back', 1)||*||*||*
 
|-
 
|-
| set(\'led\', \'back\', 0)||*||*||*
+
| set('led', 'back', 0)||*||*||*
 
|-
 
|-
| set(\'led\', \'front\', 1)||*||*||*
+
| set('led', 'front', 1)||*||*||*
 
|-
 
|-
| set(\'led\', \'front\', \'on\')||*||*||*
+
| set('led', 'front', 'on')||*||*||*
 
|-
 
|-
| set(\'led\', \'front\', 0)||*||*||*
+
| set('led', 'front', 0)||*||*||*
 
|-
 
|-
| set(\'led\', \'front\', \'off\')||*||*||*
+
| set('led', 'front', 'off')||*||*||*
 
|-
 
|-
 
| robot.function(args)||*||*||*
 
| robot.function(args)||*||*||*
Line 92: Line 90:
 
| robot.backward(0)||*||*||*
 
| robot.backward(0)||*||*||*
 
|-
 
|-
| robot.turn(\'center\', 0)||*||*||*
+
| robot.turn('center', 0)||*||*||*
 
|-
 
|-
| robot.turn(\'left\', 0)||*||*||*
+
| robot.turn('left', 0)||*||*||*
 
|-
 
|-
| robot.turn(\'right\', 0)||*||*||*
+
| robot.turn('right', 0)||*||*||*
 
|-
 
|-
 
| robot.turnLeft(0)||*||*||*
 
| robot.turnLeft(0)||*||*||*
Line 112: Line 110:
 
| robot.stop()||*||*||*
 
| robot.stop()||*||*||*
 
|-
 
|-
| robot.get(\'name\')||*||*||*
+
| robot.get('name')||*||*||*
 
|-
 
|-
| robot.get(\'stall\')||*||*||*
+
| robot.get('stall')||*||*||*
 
|-
 
|-
 
| robot.getStall()||*||*||*
 
| robot.getStall()||*||*||*
Line 120: Line 118:
 
| robot.getName()||*||*||*
 
| robot.getName()||*||*||*
 
|-
 
|-
| robot.set(\'volume\', 1)||*||*||*
+
| robot.set('volume', 1)||*||*||*
 
|-
 
|-
| robot.set(\'name\', \'theName\')||*||*||*
+
| robot.set('name', 'theName')||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'center\', \'on\')||*||*||*
+
| robot.set('led', 'center', 'on')||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'center\', 1)||*||*||*
+
| robot.set('led', 'center', 1)||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'center\', \'off\')||---||*||*
+
| robot.set('led', 'center', 'off')||---||*||*
 
|-
 
|-
| robot.set(\'led\', \'center\', 0)||---||*||*
+
| robot.set('led', 'center', 0)||---||*||*
 
|-
 
|-
| robot.set(\'led\', \'left\', \'on\')||*||*||*
+
| robot.set('led', 'left', 'on')||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'left\', 1)||*||*||*
+
| robot.set('led', 'left', 1)||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'left\', \'off\')||*||*||*
+
| robot.set('led', 'left', 'off')||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'left\', 0)||*||*||*
+
| robot.set('led', 'left', 0)||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'right\', \'on\')||*||*||*
+
| robot.set('led', 'right', 'on')||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'right\', 1)||*||*||*
+
| robot.set('led', 'right', 1)||*||*||*
 
|-
 
|-
| robot.set(\'led\', \'right\', \'off\')||*||*||*
+
| robot.set('led', 'right', 'off')||*||*||*
 
|-
 
|-
| robot.setLED(\'center\', \'on\')||*||*||*
+
| robot.setLED('center', 'on')||*||*||*
 
|-
 
|-
| robot.setLED(\'center\', 1)||*||*||*
+
| robot.setLED('center', 1)||*||*||*
 
|-
 
|-
| robot.setLED(\'center\', \'off\')||---||*||*
+
| robot.setLED('center', 'off')||---||*||*
 
|-
 
|-
| robot.setLED(\'center\', 0)||---||*||*
+
| robot.setLED('center', 0)||---||*||*
 
|-
 
|-
| robot.setLED(\'left\', \'on\')||*||*||*
+
| robot.setLED('left', 'on')||*||*||*
 
|-
 
|-
| robot.setLED(\'left\', 1)||*||*||*
+
| robot.setLED('left', 1)||*||*||*
 
|-
 
|-
| robot.setLED(\'left\', \'off\')||*||*||*
+
| robot.setLED('left', 'off')||*||*||*
 
|-
 
|-
| robot.setLED(\'left\', 0)||*||*||*
+
| robot.setLED('left', 0)||*||*||*
 
|-
 
|-
| robot.setLED(\'right\', \'on\')||*||*||*
+
| robot.setLED('right', 'on')||*||*||*
 
|-
 
|-
| robot.setLED(\'right\', 1)||*||*||*
+
| robot.setLED('right', 1)||*||*||*
 
|-
 
|-
| robot.setLED(\'right\', \'off\')||*||*||*
+
| robot.setLED('right', 'off')||*||*||*
 
|-
 
|-
| robot.setLED(\'right\', 0)||*||*||*
+
| robot.setLED('right', 0)||*||*||*
 
|-
 
|-
| robot.setName(\'theName\')||*||*||*
+
| robot.setName('theName')||*||*||*
 
|-
 
|-
| robot.setVolume(\'off\')||*||*||*
+
| robot.setVolume('off')||*||*||*
 
|-
 
|-
| robot.setVolume(\'0\')||*||*||*
+
| robot.setVolume('0')||*||*||*
 
|-
 
|-
| robot.setVolume(\'on\')||*||*||*
+
| robot.setVolume('on')||*||*||*
 
|-
 
|-
| robot.setVolume(\'1\')||*||*||*
+
| robot.setVolume('1')||*||*||*
 
|-
 
|-
 
| robot.update()||*||*||*
 
| robot.update()||*||*||*
Line 188: Line 186:
 
| robot.close()||*||*||*
 
| robot.close()||*||*||*
 
|-
 
|-
| robot.playSong(\'F# 1; G 1; A 1;\')||*||*||*
+
| robot.playSong('F# 1; G 1; A 1;')||*||*||*
 
|-
 
|-
 
| beep(0.0001, 0)||*||*||*
 
| beep(0.0001, 0)||*||*||*
Line 194: Line 192:
 
| beep(0.0001, 0, 0)||*||---||---
 
| beep(0.0001, 0, 0)||*||---||---
 
|-
 
|-
| get(\'light\')||*||---||---
+
| get('light')||*||---||---
 
|-
 
|-
| get(\'line\')||*||---||---
+
| get('line')||*||---||---
 
|-
 
|-
| get(\'all\')||*||---||---
+
| get('all')||*||---||---
 
|-
 
|-
| getLight(\'center\')||*||---||---
+
| getLight('center')||*||---||---
 
|-
 
|-
| getLight(\'left\')||*||---||---
+
| getLight('left')||*||---||---
 
|-
 
|-
| getLight(\'right\')||*||---||---
+
| getLight('right')||*||---||---
 
|-
 
|-
| getIR(\'left\')||*||---||---
+
| getIR('left')||*||---||---
 
|-
 
|-
| getIR(\'right\')||*||---||---
+
| getIR('right')||*||---||---
 
|-
 
|-
| getLine(\'left\')||*||---||---
+
| getLine('left')||*||---||---
 
|-
 
|-
| getLine(\'right\')||*||---||---
+
| getLine('right')||*||---||---
 
|-
 
|-
 
| getAll()||*||---||---
 
| getAll()||*||---||---
 
|-
 
|-
| get(\'info\')||*||---||---
+
| get('info')||*||---||---
 
|-
 
|-
 
| getInfo()||*||---||---
 
| getInfo()||*||---||---
 
|-
 
|-
| get(\'info\', \'fluke\')||*||---||---
+
| get('info', 'fluke')||*||---||---
 
|-
 
|-
| get(\'info\', \'robot\')||*||---||---
+
| get('info', 'robot')||*||---||---
 
|-
 
|-
| get(\'info\', \'robot-version\')||*||---||---
+
| get('info', 'robot-version')||*||---||---
 
|-
 
|-
| get(\'info\', \'mode\')||*||---||---
+
| get('info', 'mode')||*||---||---
 
|-
 
|-
| getBright(\'left\')||*||---||---
+
| getBright('left')||*||---||---
 
|-
 
|-
| getBright(\'middle\')||*||---||---
+
| getBright('middle')||*||---||---
 
|-
 
|-
| getBright(\'center\')||*||---||---
+
| getBright('center')||*||---||---
 
|-
 
|-
| getBright(\'right\')||*||---||---
+
| getBright('right')||*||---||---
 
|-
 
|-
 
| getBright(0)||*||---||---
 
| getBright(0)||*||---||---
Line 242: Line 240:
 
| getBright(2)||*||---||---
 
| getBright(2)||*||---||---
 
|-
 
|-
| getObstacle(\'left\')||*||---||---
+
| getObstacle('left')||*||---||---
 
|-
 
|-
| getObstacle(\'right\')||*||---||---
+
| getObstacle('right')||*||---||---
 
|-
 
|-
 
| getObstacle(0)||*||---||---
 
| getObstacle(0)||*||---||---
Line 252: Line 250:
 
| setIRPower(2)||*||---||---
 
| setIRPower(2)||*||---||---
 
|-
 
|-
| set(\'irpower\', 2)||*||---||---
+
| set('irpower', 2)||*||---||---
 
|-
 
|-
 
| getBattery()||*||---||---
 
| getBattery()||*||---||---
 
|-
 
|-
| takePicture(\'color\')||*||---||---
+
| takePicture('color')||*||---||---
 
|-
 
|-
| takePicture(\'blob\')||*||---||---
+
| takePicture('blob')||*||---||---
 
|-
 
|-
| takePicture(\'gray\')||*||---||---
+
| takePicture('gray')||*||---||---
 
|-
 
|-
 
| setWhiteBalance(1)||*||---||---
 
| setWhiteBalance(1)||*||---||---
 
|-
 
|-
| setWhiteBalance(\'on\')||*||---||---
+
| setWhiteBalance('on')||*||---||---
 
|-
 
|-
 
| setWhiteBalance(0)||*||---||---
 
| setWhiteBalance(0)||*||---||---
 
|-
 
|-
| setWhiteBalance(\'off\')||*||---||---
+
| setWhiteBalance('off')||*||---||---
 
|-
 
|-
| set(\'whitebalance\', 1)||*||---||---
+
| set('whitebalance', 1)||*||---||---
 
|-
 
|-
| set(\'whitebalance\', \'on\')||*||---||---
+
| set('whitebalance', 'on')||*||---||---
 
|-
 
|-
| set(\'whitebalance\', 0)||*||---||---
+
| set('whitebalance', 0)||*||---||---
 
|-
 
|-
| set(\'whitebalance\', \'off\')||*||---||---
+
| set('whitebalance', 'off')||*||---||---
 
|-
 
|-
 
| setLEDFront(1)||*||---||---
 
| setLEDFront(1)||*||---||---
 
|-
 
|-
| setLEDFront(\'on\')||*||---||---
+
| setLEDFront('on')||*||---||---
 
|-
 
|-
 
| setLEDFront(0)||*||---||---
 
| setLEDFront(0)||*||---||---
 
|-
 
|-
| setLEDFront(\'off\')||*||---||---
+
| setLEDFront('off')||*||---||---
 
|-
 
|-
 
| setLEDBack(1)||*||---||---
 
| setLEDBack(1)||*||---||---
Line 290: Line 288:
 
| setLEDBack(0)||*||---||---
 
| setLEDBack(0)||*||---||---
 
|-
 
|-
| robot.get(\'light\')||*||---||---
+
| robot.get('light')||*||---||---
 
|-
 
|-
| robot.get(\'line\')||*||---||---
+
| robot.get('line')||*||---||---
 
|-
 
|-
| robot.get(\'all\')||*||---||---
+
| robot.get('all')||*||---||---
 
|-
 
|-
| robot.get(\'data\')||*||---||---
+
| robot.get('data')||*||---||---
 
|-
 
|-
| robot.get(\'ir\', \'left\')||*||---||---
+
| robot.get('ir', 'left')||*||---||---
 
|-
 
|-
| robot.get(\'ir\', \'right\')||*||---||---
+
| robot.get('ir', 'right')||*||---||---
 
|-
 
|-
| robot.get(\'line\', \'left\')||*||---||---
+
| robot.get('line', 'left')||*||---||---
 
|-
 
|-
| robot.get(\'line\', \'right\')||*||---||---
+
| robot.get('line', 'right')||*||---||---
 
|-
 
|-
| robot.get(\'light\', \'left\')||*||---||---
+
| robot.get('light', 'left')||*||---||---
 
|-
 
|-
| robot.get(\'light\', \'right\')||*||---||---
+
| robot.get('light', 'right')||*||---||---
 
|-
 
|-
| robot.get(\'light\', \'center\')||*||---||---
+
| robot.get('light', 'center')||*||---||---
 
|-
 
|-
| robot.getLight(\'left\')||*||---||---
+
| robot.getLight('left')||*||---||---
 
|-
 
|-
| robot.getLight(\'right\')||*||---||---
+
| robot.getLight('right')||*||---||---
 
|-
 
|-
| robot.getLight(\'center\')||*||---||---
+
| robot.getLight('center')||*||---||---
 
|-
 
|-
| robot.getIR(\'left\')||*||---||---
+
| robot.getIR('left')||*||---||---
 
|-
 
|-
| robot.getIR(\'right\')||*||---||---
+
| robot.getIR('right')||*||---||---
 
|-
 
|-
| robot.getLine(\'left\')||*||---||---
+
| robot.getLine('left')||*||---||---
 
|-
 
|-
| robot.getLine(\'right\')||*||---||---
+
| robot.getLine('right')||*||---||---
 
|-
 
|-
 
| robot.getAll()||*||---||---
 
| robot.getAll()||*||---||---
Line 330: Line 328:
 
| robot.getInfo()||*||---||---
 
| robot.getInfo()||*||---||---
 
|-
 
|-
| robot.getInfo(\'robot\')||*||---||---
+
| robot.getInfo('robot')||*||---||---
 
|-
 
|-
| robot.getInfo(\'fluke\')||*||---||---
+
| robot.getInfo('fluke')||*||---||---
 
|-
 
|-
| robot.getInfo(\'robot-version\')||*||---||---
+
| robot.getInfo('robot-version')||*||---||---
 
|-
 
|-
| robot.getInfo(\'mode\')||*||---||---
+
| robot.getInfo('mode')||*||---||---
 
|-
 
|-
| robot.set(\'data\', 0, 1)||*||---||---
+
| robot.set('data', 0, 1)||*||---||---
 
|-
 
|-
 
| robot.beep(0, 0, 0)||*||---||---
 
| robot.beep(0, 0, 0)||*||---||---

Revision as of 17:03, 31 March 2008

Below is a table showing which commands work on which robots (currently the Scribbler, Roomba, and Create are included).

Function Scribbler Roomba Create
forward(0.69999999999999996) * * *
stop() * * *
forward(0.69999999999999996, 0.10000000000000001) * * *
backward(0.69999999999999996) * * *
backward(0.69999999999999996, 0.10000000000000001) * * *
turn('left', 0.5) * * *
turn('right', 0.5) * * *
turn('straight', 0.5) * * *
turnLeft(0.59999999999999998) * * *
turnRight(0.59999999999999998) * * *
translate(1) * * *
rotate(0.5) * * *
move(1, 1) * * *
motors(0.40000000000000002, 0.40000000000000002) * * *
update() * * *
restart() * * *
get('stall') * * *
get('config') * * *
getStall() * * *
getName() * * *
getVolume() * * *
getStartSong() * * *
set('name', 'theName') * * *
set('volume', 'on') * * *
set('led', 'center', 'off') --- * *
set('led', 'right', 'off') * * *
set('led', 'left', 'off') * * *
setLED('left', 'on') * * *
setName('theName') * * *
setVolume(0) * * *
setVolume('off') * * *
setVolume(1) * * *
setVolume('on') * * *
set('led', 'back', 1) * * *
set('led', 'back', 0) * * *
set('led', 'front', 1) * * *
set('led', 'front', 'on') * * *
set('led', 'front', 0) * * *
set('led', 'front', 'off') * * *
robot.function(args) * * *
robot.forward(0) * * *
robot.backward(0) * * *
robot.turn('center', 0) * * *
robot.turn('left', 0) * * *
robot.turn('right', 0) * * *
robot.turnLeft(0) * * *
robot.turnRight(0) * * *
robot.translate(0) * * *
robot.rotate(0) * * *
robot.move(0, 0) * * *
robot.motors(0, 0) * * *
robot.stop() * * *
robot.get('name') * * *
robot.get('stall') * * *
robot.getStall() * * *
robot.getName() * * *
robot.set('volume', 1) * * *
robot.set('name', 'theName') * * *
robot.set('led', 'center', 'on') * * *
robot.set('led', 'center', 1) * * *
robot.set('led', 'center', 'off') --- * *
robot.set('led', 'center', 0) --- * *
robot.set('led', 'left', 'on') * * *
robot.set('led', 'left', 1) * * *
robot.set('led', 'left', 'off') * * *
robot.set('led', 'left', 0) * * *
robot.set('led', 'right', 'on') * * *
robot.set('led', 'right', 1) * * *
robot.set('led', 'right', 'off') * * *
robot.setLED('center', 'on') * * *
robot.setLED('center', 1) * * *
robot.setLED('center', 'off') --- * *
robot.setLED('center', 0) --- * *
robot.setLED('left', 'on') * * *
robot.setLED('left', 1) * * *
robot.setLED('left', 'off') * * *
robot.setLED('left', 0) * * *
robot.setLED('right', 'on') * * *
robot.setLED('right', 1) * * *
robot.setLED('right', 'off') * * *
robot.setLED('right', 0) * * *
robot.setName('theName') * * *
robot.setVolume('off') * * *
robot.setVolume('0') * * *
robot.setVolume('on') * * *
robot.setVolume('1') * * *
robot.update() * * *
robot.restart() * * *
robot.open() * * *
robot.close() * * *
robot.playSong('F# 1; G 1; A 1;') * * *
beep(0.0001, 0) * * *
beep(0.0001, 0, 0) * --- ---
get('light') * --- ---
get('line') * --- ---
get('all') * --- ---
getLight('center') * --- ---
getLight('left') * --- ---
getLight('right') * --- ---
getIR('left') * --- ---
getIR('right') * --- ---
getLine('left') * --- ---
getLine('right') * --- ---
getAll() * --- ---
get('info') * --- ---
getInfo() * --- ---
get('info', 'fluke') * --- ---
get('info', 'robot') * --- ---
get('info', 'robot-version') * --- ---
get('info', 'mode') * --- ---
getBright('left') * --- ---
getBright('middle') * --- ---
getBright('center') * --- ---
getBright('right') * --- ---
getBright(0) * --- ---
getBright(1) * --- ---
getBright(2) * --- ---
getObstacle('left') * --- ---
getObstacle('right') * --- ---
getObstacle(0) * --- ---
getObstacle(1) * --- ---
setIRPower(2) * --- ---
set('irpower', 2) * --- ---
getBattery() * --- ---
takePicture('color') * --- ---
takePicture('blob') * --- ---
takePicture('gray') * --- ---
setWhiteBalance(1) * --- ---
setWhiteBalance('on') * --- ---
setWhiteBalance(0) * --- ---
setWhiteBalance('off') * --- ---
set('whitebalance', 1) * --- ---
set('whitebalance', 'on') * --- ---
set('whitebalance', 0) * --- ---
set('whitebalance', 'off') * --- ---
setLEDFront(1) * --- ---
setLEDFront('on') * --- ---
setLEDFront(0) * --- ---
setLEDFront('off') * --- ---
setLEDBack(1) * --- ---
setLEDBack(0) * --- ---
robot.get('light') * --- ---
robot.get('line') * --- ---
robot.get('all') * --- ---
robot.get('data') * --- ---
robot.get('ir', 'left') * --- ---
robot.get('ir', 'right') * --- ---
robot.get('line', 'left') * --- ---
robot.get('line', 'right') * --- ---
robot.get('light', 'left') * --- ---
robot.get('light', 'right') * --- ---
robot.get('light', 'center') * --- ---
robot.getLight('left') * --- ---
robot.getLight('right') * --- ---
robot.getLight('center') * --- ---
robot.getIR('left') * --- ---
robot.getIR('right') * --- ---
robot.getLine('left') * --- ---
robot.getLine('right') * --- ---
robot.getAll() * --- ---
robot.getInfo() * --- ---
robot.getInfo('robot') * --- ---
robot.getInfo('fluke') * --- ---
robot.getInfo('robot-version') * --- ---
robot.getInfo('mode') * --- ---
robot.set('data', 0, 1) * --- ---
robot.beep(0, 0, 0) * --- ---