Commands
These commands are collection of functions from from ti_system import* modules as well as from the TI Rover module.
sleep(seconds)
Command: |
|
---|---|
Command |
sleep(seconds) |
Module: |
ti_system |
Describe: |
Sleep for a given number of seconds. Seconds argument is a float. |
Python |
Run the program TIME
|
Result: |
Sleep for a given number of seconds. Seconds argument is a float. |
Error: |
|
Type or |
from ti_system import* |
See Also:sleep
disp_at(row,col,"text")
Command: |
|
---|---|
Command |
|
Module: |
|
Describe: |
Display text starting at a row and column position on the plotting area.
|
Python |
|
Result: |
Display text starting at a row and column position on the plotting area. |
Error: |
|
Type or |
from ti_system import* |
See Also:disp_at(r,c,t)
disp_clr()
Command: |
|
---|---|
Command |
|
Module: |
|
Describe: |
Clear the screen in the Shell environment. Row 0-11, integer may be used as an optional argument to clear a display row of the Shell environment. |
Python |
|
Result: |
Clear the screen in the Shell environment. Row 0-11, integer may be used as an optional argument to clear a display row of the Shell environment. |
Error: |
|
Type or |
from ti_system import* |
See Also:disp_clr()
disp_wait()
Command: |
|
---|---|
Command |
|
Module: |
|
Describe: |
Stop the execution of program at this point and display screen content until |
Python |
|
Result: |
Stop the execution of program at this point and display screen content until [clear] is pressed and the screen is cleared. |
Error: |
|
Type or |
from ti_system import* |
See Also:disp_wait()
disp_cursor()
Command: |
|
---|---|
Command |
|
Module: |
|
Describe: |
Control the display of the cursor in the Shell when a program is running. |
Python |
|
Result: |
Control the display of the cursor in the Shell when a program is running. |
Error: |
|
Type or |
from ti_system import* |
See Also:disp_cursor()
while not escape(): clear
Command: |
|
---|---|
Command |
|
Module: |
|
Describe: |
In a while loop running in a program where the program offers to end the loop but keep the script running.
Run the commands in the "while" loop until the "esc" key is pressed.. |
Python |
|
Result: |
|
Error: |
|
Type or |
from ti_system import* |
rv.wait_until_done()
Command: |
.wait_until_done() |
---|---|
Command |
.wait_until_done() |
Python |
rv.wait_until_done() Sample program for i in range(4): ••rv.forward(.5,"M") ••rv.left() ••rv.wait_until_done() ••rv.color_rgb(255,0,0) ••sleep(1) ••rv.color_off()
Note: This program works well for the task of turning on the Rover’s LED to red for 1 second and then off after each left turn in the square. |
Range: |
N/A |
Describe: |
Program waits until TI-Rover stops moving. |
Result: |
Program waits until TI-Rover stops moving. |
Type or |
Setting |
while not path_done()
Command: |
while not path_done() |
---|---|
Command Syntax: |
while not path_done() |
Method: |
rv.while not path_done() |
Range: |
|
Describe: |
Runs the commands in the "while" loop until the Rover is finished with all movement. |
Result: |
The path_done() function returns a value of 0 or 1 depending on whether the Rover is moving (0) or finished with all movement (1). |
Errors: |
|
Type or |
|
rv.position()
Command: |
.position() |
---|---|
Command |
.position(x,y) .position(x,y,heading,”unit”) |
Python |
rv.position(xxx, yyy [, hhh, “degrees”|”radians”|”grads”]) |
Range: |
N/A |
Describe: |
Sets the coordinate position and optionally the heading of the Rover on the virtual grid. |
Result: |
Rover configuration is updated. |
Type or |
Setting |
rv.grid_origin()
Command: |
.grid_origin() |
---|---|
Command |
.grid_origin() |
Python |
rv.grid_origin() |
Range: |
N/A |
Describe: |
Sets RV as being at current grid origin point of (0,0). The "heading" is set to 0.0 resulting in the current position of the RV now set to pointing down a virtual x-axis toward positive x values. |
Result: |
|
Type or |
Setting |
rv.grid_m_unit()
Command: |
.grid_m_unit() |
---|---|
Command |
.grid_m_unit(scale_value) |
Python |
rv.grid_m_unit(nnn) |
Range: |
N/A |
Describe: |
Set the size of a “grid unit” on the virtual grid. Default is 0.1 meters per unit grid. A scale_value of 0.2 means 5 units per meter (20 cm per unit grid). A scale_value of 0.05 means 20 units per meter (5 cm per unit grid). Set the size of a "grid unit" on the virtual grid. Default is 10 units per meter (100 mm / 10 cm per unit grid). A value of 5 means 5 units per meter or 200 mm / 20 cm per unit grid). A value of 20 means 20 units per meter, or 50 mm / 5 cm per. |
Result: |
|
Type or |
Setting |
rv.path_clear()
Command: |
.path_clear() |
---|---|
Command |
.path_clear() |
Python |
rv.path_clear() |
Range: |
N/A |
Describe: |
Clears any pre-existing path / waypoint information. Recommended before doing a sequence of movement operations where waypoint / path-list information. |
Result: |
|
Type or |
Setting |
rv.zero_gyro()
Command: |
.zero_gyro() |
---|---|
Command |
.zero_gyro() |
Python |
rv.zero_gyro() |
Range: |
N/A |
Describe: |
Resets the Rover gyro to 0.0 angle and clears the left and right wheel encoder counts. |
Result: |
|
Error: |
|
Type or |
Setting |