TI-Innovator™ Rover Commands Version 1.5

Prerequisite: Use the Send "Connect RV" Command First

The "CONNECT RV" command needs to be used first when using the Rover. The "CONNECT RV" command configures the TI-Innovator™ Hub software to work with the TI-Innovator™ Rover.

It establishes the connections to the various devices on the Rover – two motors, two encoders, one gyroscope, one RGB LED and one color sensor. It also clears the various counters and sensor values. The optional ‘MOTORS’ parameter configures only the motors and allows direct control of motors without the additional peripherals.

CONNECT RV - initializes the hardware connections.

Connects RV and inputs and outputs built into the RV.
Resets the Path and the Grid Origin.
Sets the units per meter to default value of 10. Default Grid unit = 10cm.

Named RV Subsystems

The RV object contains several subsystems that are directly addressed by name. These subsystems consist of the wheels, and sensors that let the Rover sense the world.

The subsystems are listed by name in the following table.

Subsystem Name

Description of Subsystem

RV

The RV object as a whole.

RV.COLOR

The tri-color RGB LED on the top surface of the Rover can be controlled through user programs to display any color combination.

RV.COLORINPUT

The color sensor is on the bottom of the Rover and is used to detect the color of the surface.

RV.RANGER

The front-facing ultrasonic distance sensor. Returns measurements in meters. ~10.00 meters means no obstacle was detected.

RV.ENCODERGYRO

The rotary encoders – one on each motor – measure the distance traveled by the Rover.

The left and right encoder, coupled with the gyroscope and operating time information.

RV.GYRO

The gyroscope is used to maintain the heading of Rover while it’s in motion. It can also be used to measure the change in angle during turns.

RV.MOTOR.L

Left wheel motor and control for direct control (advanced) use.

RV.MOTOR.R

Right wheel motor and control for direct control (advanced) use.

RV.MOTORS

Both the LEFT and RIGHT motor, managed as a single object for direct control (advanced) use.


Rover Command Categories

The Rover commands fall into two categories:

1. Queued execution: All of the Rover motion commands – FORWARD, BACKWARD, LEFT, RIGHT, ANGLE – are queued on the TI-Innovator Hub. They may execute at a future time.
2. Immediate execution: Other commands – like the ones to read the sensors or set the RGB LED on the Rover – are executed immediately.

This means that certain statements in your program will execute before statements that appear earlier in the program especially if the latter commands are part of the queued family.

For example, in the program below, the RGB LED will turn RED before the Rover stops moving:

Send "SET RV.COLOR 255 0 255" – immediately executed

Send "RV FORWARD 5" – queued command

Send "RV LEFT 45" – queued command

Send "RV RIGHT 90" – queued command

Send "SET RV.COLOR 255 0 0" – immediately executed

Example:

To change color after a "FORWARD" movement, use "TIME" parameter with "WAIT".

Send "RV FORWARD TIME 5"

WAIT 5

Send "SET RV.COLOR 255 0 255"


RV Commands, Code Samples, and Syntax

The following examples show how various commands for the RV are used. Anywhere a SET command is used, the SET may be left off (optional use).

Code Samples

When you see "Code Sample" in a command table, this "Code Sample" may be copied and pasted as is to send to your graphing calculator to use in your calculations.

Example:

Code
Sample:

Send ("RV FORWARD 5")

Send ("RV FORWARD SPEED 0.2 M/S TIME 10")

 


TI-Innovator™ Rover Menu

 

Rover (RV)...

CE Calculators

TI‑Nspire™ CX


Drive RV…
Read RV Sensors…
RV Settings…
Read RV Path…
RV Color…
RV Setup…
RV Control…
Send("CONNECT RV")
Send("DISCONNECT RV")


 

Drive RV…
Send( "RV
FORWARD
BACKWARD
LEFT
RIGHT
STOP
RESUME
STAY
TO XY
TO POLAR
TO ANGLE

CE Calculators

TI‑Nspire™ CX


 

Read RV Sensors…
Send"READ"
RV.RANGER
RV.COLORINPUT
RV.COLORINPUT.RED
RV.COLORINPUT.GREEN
RV.COLORINPUT.BLUE
RV.COLORINPUT.GRAY

CE Calculators

TI‑Nspire™ CX


RV Settings...
RV Settings
SPEED
TIME
DISTANCE
UNIT/S
M/S
REV/S
UNITS
M
REVS
DEGREES
RADIANS
GRADS
XYLINE
LEFT
RIGHT
BRAKE
COAST
CW
CCW

CE Calculators

TI‑Nspire™ CX


 

Read RV Path…
Send "READ
RV.WAYPOINT.XYTHDRN
RV.WAYPOINT.PREV
RV.WAYPOINT.CMDNUM
RV.PATHLIST.X
RV.PATHLIST.Y
RV.PATHLIST.TIME
RV.PATHLIST.HEADING
RV.PATHLIST.DISTANCE
RV.PATHLIST.REVS
RV.PATHLIST.CMDNUM
RV.WAYPOINT.X
RV.WAYPOINT.Y
RV.WAYPOINT.TIME
RV.WAYPOINT.HEADING
RV.WAYPOINT.DISTANCE
RV.WAYPOINT.REVS

CE Calculators

TI‑Nspire™ CX


 

RV Color…
Send "SET
RV.COLOR
RV.COLOR.RED
RV.COLOR.GREEN
RV.COLOR.BLUE

CE Calculators

TI‑Nspire™ CX


 

RV Setup…
Send "SET
RV.POSITION
RV.GYRO
RV.GRID.ORIGIN
RV.GRID.M/UNIT
RV.PATH CLEAR
RV MARK

CE Calculators

TI‑Nspire™ CX


 

RV Control…
Send "
SET RV.MOTORS
SET RV.MOTOR.L
SET RV.MOTOR.R
SET RV.ENCODERSGYRO 0
READ RV.ENCODERSGYRO
READ RV.GYRO
READ RV.DONE
READ RV.ETA

CE Calculators

TI‑Nspire™ CX


 

Send "CONNECT RV"
Send "CONNECT RV"
CONNECT RV

CE Calculators

TI‑Nspire™ CX


 

Send "DISCONNECT RV"
Send "DISCONNECT RV"
DISCONNECT RV

CE Calculators

TI‑Nspire™ CX