Constructor
new ThreeWheelDistanceSensingRobotController(id)
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The id of the robot |
- License:
- MIT
- Source:
Methods
backup()
Makes a backup maneuvre: backward, turn, forward again.
beep() → {ThreeWheelDistanceSensingRobotController}
Makes the buzzer beep.
Returns:
- The controller
decreaseSpeed() → {ThreeWheelDistanceSensingRobotController}
Decreases speed of 0.05.
Returns:
- The controller
enableInfraredReader() → {ThreeWheelDistanceSensingRobotController}
Enables the infrared reader.
Returns:
- The controller
enableSonars() → {ThreeWheelDistanceSensingRobotController}
Enables all the sonars.
Returns:
- The controller
handleInfraredReaderCode()
Handles the code read by the infrared reader.
increaseSpeed() → {ThreeWheelDistanceSensingRobotController}
Increases speed of 0.05.
Returns:
- The controller
leftBackward()
Activates the left wheel to move backward.
leftForward()
Activates the left wheel to move forward.
moveBackward()
Activates the wheels to move backward.
moveForward()
Activates the wheels to move forward.
pause() → {ThreeWheelDistanceSensingRobotController}
Makes the robot pause.
Returns:
- The controller
play() → {ThreeWheelDistanceSensingRobotController}
Makes the robot play.
Returns:
- The controller
rightBackward()
Activates the right wheel to move backward.
rightForward()
Activates the right wheel to move forward.
setSpeed(speed) → {ThreeWheelDistanceSensingRobotController}
Sets the speed of the wheels.
Parameters:
Name | Type | Description |
---|---|---|
speed |
float | The speed (between 0.0 and 1.0, otherwise clipped) |
Returns:
- The controller
setup(options) → {ThreeWheelDistanceSensingRobotController}
Configures the robot.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The configuration settings (currently unused) |
Returns:
- The controller
stop()
Stops both wheels.
toggleLedBlinking(led) → {ThreeWheelDistanceSensingRobotController}
Toggles LED's blinking.
Parameters:
Name | Type | Description |
---|---|---|
led |
string | The code associated to the LED |
Returns:
- The controller
toggleLedBlinking1() → {ThreeWheelDistanceSensingRobotController}
Toggles LED1's blinking.
Returns:
- The controller
toggleLedBlinking2() → {ThreeWheelDistanceSensingRobotController}
Toggles LED2's blinking.
Returns:
- The controller
toggleLedBlinking3() → {ThreeWheelDistanceSensingRobotController}
Toggles LED3's blinking.
Returns:
- The controller
turnLeft()
Activates the wheels to turn left.
turnRight()
Activates the wheels to turn right.