Rover's Escape: Programming Challenges with Texas Instruments Calculators

Rover, escape the room!
Texas Instruments
@ticalculators
 #tiinnovator
See projects at 
Contact 
 with questions
.
STEM-team@ti.comwww.TIstemProjects.com
Write a program to help Rover escape
T
a
s
k
:
 
U
s
e
 
t
h
e
 
r
a
n
g
e
r
t
o
 
f
i
n
d
 
t
h
e
 
o
p
e
n
i
n
g
 
i
n
a
 
s
e
t
 
o
f
 
b
o
x
e
s
 
a
n
d
h
a
v
e
 
R
o
v
e
r
 
e
s
c
a
p
e
t
h
r
o
u
g
h
 
t
h
e
 
o
p
e
n
i
n
g
.
You will need to read the
heading for each turn and
compare the ranger
measurements to determine
where the opening is.
N
e
w
 
P
r
o
g
r
a
m
:
Some questions to think about
»
What will Rover measure?
»
How will you instruct Rover “look” for a gap?
»
How will Rover know there is a gap?
»
Will you have Rover
»
e
s
c
a
p
e
 
a
s
 
s
o
o
n
 
a
s
 
a
 
g
a
p
 
i
s
 
d
e
t
e
c
t
e
d
 
o
r
»
will you look at all the options before deciding where to drive?
»
How will Rover ”remember” the location of a gap?
»
How will you instruct Rover to drive through a gap?
»
Are there patterns in the Rover behavior that your program can
adjust for?
»
What will you do if there is no gap in the wall?
Write your own program
P
u
r
p
o
s
e
What is the purpose of your program?
N
a
m
e
What is the name of your program?
V
a
r
i
a
b
l
e
s
What variables will you need?
What will you call them?
I
n
p
u
t
s
What input values or
measurements will you need?
O
u
t
p
u
t
s
What values will you print?
What physical outputs will you
make?
C
a
l
c
u
l
a
t
i
o
n
s
 
a
n
d
C
o
n
t
r
o
l
 
S
t
a
t
e
m
e
n
t
s
What calculations will you need?
What conditional logic
statements will you need?
What loops will you need?
M
o
d
u
l
e
s
:
 
W
h
a
t
 
m
o
d
u
l
e
s
 
(
i
f
 
a
n
y
)
 
d
o
 
y
o
u
 
n
e
e
d
 
t
o
 
i
m
p
o
r
t
?
B
U
I
L
D
I
N
G
 
U
P
 
T
O
 
T
H
E
 
F
I
N
A
L
C
H
A
L
L
E
N
G
E
 
How far away is that?
T
a
s
k
:
 
U
s
e
 
t
h
e
 
R
o
v
e
r
 
r
a
n
g
e
r
 
t
o
d
e
t
e
c
t
 
d
i
s
t
a
n
c
e
 
t
o
 
a
n
 
o
b
j
e
c
t
a
n
d
 
d
i
s
p
l
a
y
 
t
h
e
 
d
i
s
t
a
n
c
e
 
o
n
t
h
e
 
s
c
r
e
e
n
What is the unit of measurement reported
by the ranger?
What distance measurements do you see
when the Rover is pointed at different
places on the enclosure wall?
W
h
a
t
 
d
i
s
t
a
n
c
e
 
m
e
a
s
u
r
e
m
e
n
t
s
 
d
o
 
y
o
u
 
s
e
e
w
h
e
n
 
R
o
v
e
r
 
i
s
 
p
o
i
n
t
e
d
 
a
t
 
a
 
g
a
p
 
i
n
 
t
h
e
 
w
a
l
l
?
N
e
w
 
P
r
o
g
r
a
m
:
Find rv.ranger_measurement() on the
TI-Rover 3:Inputs menu
Store a value to a variable with “=“
Find print() on the Built-ins 6:I/O menu
Am I close or far?
T
a
s
k
:
 
U
s
e
 
t
h
e
 
R
o
v
e
r
 
r
a
n
g
e
r
 
t
o
d
e
t
e
c
t
 
d
i
s
t
a
n
c
e
 
t
o
 
a
n
 
o
b
j
e
c
t
,
p
r
i
n
t
 
t
h
e
 
d
i
s
t
a
n
c
e
.
H
a
v
e
 
t
h
e
 
R
o
v
e
r
 
d
e
c
i
d
e
 
i
f
 
t
h
e
 
o
b
j
e
c
t
 
i
s
f
a
r
 
a
w
a
y
.
 
P
r
i
n
t
 
a
n
 
a
l
e
r
t
 
m
e
s
s
a
g
e
.
T
r
y
 
d
i
f
f
e
r
e
n
t
 
v
a
l
u
e
s
 
f
o
r
 
t
h
e
 
w
h
a
t
i
s
f
a
r
v
a
r
i
a
b
l
e
.
N
e
w
 
P
r
o
g
r
a
m
:
F
i
n
d
 
t
h
e
 
i
f
 
s
t
a
t
e
m
e
n
t
 
[
m
e
n
u
]
 
B
u
i
l
t
-
i
n
s
 
2
:
C
o
n
t
r
o
l
 
1
:
i
f
.
.
:
If the logic statement at the beginning of the if block is true the program runs the block.
If the logic statement is false, then the block is skipped.
The block starts with a colon and includes all of the indented statements.
T
h
e
 
v
a
l
u
e
 
f
o
r
 
t
h
e
 
v
a
r
i
a
b
l
e
 
w
h
a
t
i
s
f
a
r
 
d
e
t
e
r
m
i
n
e
s
 
w
h
a
t
 
i
s
 
c
o
n
s
i
d
e
r
e
d
 
t
o
 
b
e
 
f
a
r
 
o
r
 
c
l
o
s
e
.
The print() function can take multiple inputs separated commas.
Text strings are a set of characters enclosed in quotes. The exact characters are printed.
The quote symbol is entered on the keyboard by [ctrl] [multiple]
A variable name refers to a value. The current value of the variable is printed.
What time is it?
T
a
s
k
:
 
U
s
e
 
R
o
v
e
r
 
t
o
 
t
u
r
n
 
t
h
e
h
o
u
r
s
 
o
f
 
a
 
c
l
o
c
k
.
Make Rover turn clockwise and stop on every
hour of the clock for a 12 hour clock.
Print the current time.
 
What angle should the Rover turn to stop at twelve hour marks?
 
Why do we print n+1 for the current hour?
 
Put the Rover inside your room. Add statements to measure
and print distance to the wall at each hour. What patterns do
you see in the measurements?
 
I
f
 
y
o
u
 
f
i
n
i
s
h
 
e
a
r
l
y
,
 
c
r
e
a
t
e
 
a
 
w
a
y
 
t
o
 
s
h
o
w
 
a
 
2
4
 
h
o
u
r
 
c
l
o
c
k
.
N
e
w
 
P
r
o
g
r
a
m
:
Import the time module at [menu] A:More Modules 2:Time to have access to the sleep() function.
Find sleep() on the TI-Rover 7:Commands menu
The sleep() function pauses the program for the number of seconds of the input value in parentheses
F
i
n
d
 
t
h
e
 
f
o
r
 
l
o
o
p
 
s
t
a
t
e
m
e
n
t
 
[
m
e
n
u
]
 
B
u
i
l
t
-
i
n
s
 
2
:
C
o
n
t
r
o
l
 
4
:
f
o
r
 
i
n
d
e
x
 
i
n
 
r
a
n
g
e
(
s
i
z
e
)
:
A
 
f
o
r
 
l
o
o
p
 
r
e
p
e
a
t
s
 
a
 
b
l
o
c
k
 
o
f
 
c
o
d
e
 
a
 
k
n
o
w
n
 
n
u
m
b
e
r
 
o
f
 
t
i
m
e
s
 
s
e
t
 
b
y
 
t
h
e
 
v
a
l
u
e
 
o
f
 
t
h
e
 
r
a
n
g
e
 
s
i
z
e
.
The loop repeats statements in the indented block beginning with a colon.
T
h
e
 
i
n
d
e
x
 
v
a
r
i
a
b
l
e
 
n
 
b
e
g
i
n
s
 
a
t
 
z
e
r
o
 
a
n
d
 
i
n
c
r
e
a
s
e
s
 
b
y
 
1
 
a
f
t
e
r
 
e
a
c
h
 
l
o
o
p
.
L
o
o
p
i
n
g
 
s
t
o
p
s
 
w
h
e
n
 
n
 
i
s
 
e
q
u
a
l
 
t
o
 
o
r
 
g
r
e
a
t
e
r
 
t
h
a
n
 
t
h
e
 
l
o
o
p
 
s
i
z
e
.
Watch Out!!!
T
a
s
k
:
 
D
r
i
v
e
 
R
o
v
e
r
 
a
t
 
a
n
 
o
b
j
e
c
t
a
n
d
 
s
t
o
p
 
p
r
i
o
r
 
t
o
 
t
h
e
 
c
o
l
l
i
s
i
o
n
.
Use the ranger to detect when
Rover is within 20 cm (.2
meters) of an obstacle and stop.
T
r
y
 
d
i
f
f
e
r
e
n
t
 
v
a
l
u
e
s
 
f
o
r
 
t
h
e
 
s
t
o
p
d
i
s
t
a
n
c
e
.
N
e
w
 
P
r
o
g
r
a
m
:
F
i
n
d
 
t
h
e
 
w
h
i
l
e
 
l
o
o
p
 
s
t
a
t
e
m
e
n
t
 
[
m
e
n
u
]
 
B
u
i
l
t
-
i
n
s
 
2
:
C
o
n
t
r
o
l
 
8
:
w
h
i
l
e
.
.
:
A
 
w
h
i
l
e
 
l
o
o
p
 
r
e
p
e
a
t
s
 
a
 
b
l
o
c
k
 
o
f
 
c
o
d
e
 
a
s
 
l
o
n
g
 
a
s
 
t
h
e
 
i
n
i
t
i
a
l
 
c
o
n
d
i
t
i
o
n
 
i
s
 
t
r
u
e
.
 
T
h
e
 
n
u
m
b
e
r
 
o
f
 
r
e
p
e
t
i
t
i
o
n
s
 
i
s
 
u
n
k
n
o
w
n
.
The loop repeats statements in the indented block beginning with a colon.
The loop continues to repeat as long as the initial statement checks as true.
When the loop stops, the program moves on to the line just after the loop
The print() function can take multiple inputs separated by commas.
Text strings are a set of characters enclosed in quotes. The exact characters are printed.
The quote symbol is entered on the keyboard by [ctrl] [multiple]
A variable name refers to a value. The current value of the variable is printed.
F
I
N
A
L
 
C
H
A
L
L
E
N
G
E
 
Escape now
T
a
s
k
:
 
U
s
e
 
t
h
e
 
R
o
v
e
r
 
r
a
n
g
e
r
 
t
o
d
e
t
e
c
t
 
a
 
g
a
p
 
i
n
 
t
h
e
 
w
a
l
l
 
a
n
d
d
r
i
v
e
 
t
h
r
o
u
g
h
 
i
t
.
What is the distance measurement when
Rover is pointed at a gap in the wall.
Are there patterns in the Rover behavior
that your program can adjust for?
H
o
w
 
w
o
u
l
d
 
y
o
u
 
m
o
d
i
f
y
 
y
o
u
r
 
p
r
o
g
r
a
m
 
t
o
h
a
n
d
l
e
 
t
h
e
 
s
i
t
u
a
t
i
o
n
 
w
h
e
n
 
t
h
e
r
e
 
i
s
 
n
o
 
g
a
p
?
N
e
w
 
P
r
o
g
r
a
m
:
Drive through the maximum gap
T
a
s
k
:
 
U
s
e
 
t
h
e
 
R
o
v
e
r
 
r
a
n
g
e
r
 
t
o
d
e
t
e
c
t
 
t
h
e
 
m
a
x
i
m
u
m
 
g
a
p
 
i
n
t
h
e
 
w
a
l
l
 
a
n
d
 
d
r
i
v
e
 
t
h
r
o
u
g
h
 
i
t
.
Are there patterns in the Rover behavior
that your program can adjust for?
H
o
w
 
w
o
u
l
d
 
y
o
u
 
m
o
d
i
f
y
 
y
o
u
r
 
p
r
o
g
r
a
m
 
t
o
h
a
n
d
l
e
 
t
h
e
 
s
i
t
u
a
t
i
o
n
 
w
h
e
n
 
t
h
e
r
e
 
i
s
 
n
o
 
g
a
p
?
N
e
w
 
P
r
o
g
r
a
m
:
F
I
N
A
L
 
C
H
A
L
L
E
N
G
E
E
X
A
M
P
L
E
S
 
Escape now
T
a
s
k
:
 
U
s
e
 
t
h
e
 
R
o
v
e
r
 
r
a
n
g
e
r
 
t
o
d
e
t
e
c
t
 
a
 
g
a
p
 
i
n
 
t
h
e
 
w
a
l
l
 
a
n
d
d
r
i
v
e
 
t
h
r
o
u
g
h
 
i
t
.
What is the distance measurement when
Rover is pointed at a gap in the wall.
A
r
e
 
t
h
e
r
e
 
p
a
t
t
e
r
n
s
 
i
n
 
t
h
e
 
R
o
v
e
r
 
b
e
h
a
v
i
o
r
t
h
a
t
 
y
o
u
r
 
p
r
o
g
r
a
m
 
c
a
n
 
a
d
j
u
s
t
 
f
o
r
?
H
o
w
 
w
o
u
l
d
 
y
o
u
 
m
o
d
i
f
y
 
y
o
u
r
 
p
r
o
g
r
a
m
 
t
o
h
a
n
d
l
e
 
t
h
e
 
s
i
t
u
a
t
i
o
n
 
w
h
e
n
 
t
h
e
r
e
 
i
s
 
n
o
 
g
a
p
?
N
e
w
 
P
r
o
g
r
a
m
:
Drive through the maximum gap
T
a
s
k
:
 
U
s
e
 
t
h
e
 
R
o
v
e
r
 
r
a
n
g
e
r
 
t
o
d
e
t
e
c
t
 
t
h
e
 
m
a
x
i
m
u
m
 
g
a
p
 
i
n
t
h
e
 
w
a
l
l
 
a
n
d
 
d
r
i
v
e
 
t
h
r
o
u
g
h
 
i
t
.
Are there patterns in the Rover behavior
that your program can adjust for?
H
o
w
 
w
o
u
l
d
 
y
o
u
 
m
o
d
i
f
y
 
y
o
u
r
 
p
r
o
g
r
a
m
 
t
o
h
a
n
d
l
e
 
t
h
e
 
s
i
t
u
a
t
i
o
n
 
w
h
e
n
 
t
h
e
r
e
 
i
s
 
n
o
 
g
a
p
?
N
e
w
 
P
r
o
g
r
a
m
:
Slide Note
Embed
Share

"Embark on a coding adventure with Rover and Texas Instruments calculators to solve puzzles and help Rover escape through challenging scenarios. Explore the world of STEM, problem-solving, and programming while guiding Rover through obstacles and utilizing the Ranger feature. Develop your programming skills and create innovative solutions for Rover's mission to escape the room."

  • Rovers Escape
  • Programming Challenges
  • Texas Instruments
  • STEM Projects
  • Ranger feature

Uploaded on Nov 22, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Rover, escape the room! Texas Instruments @ticalculators #tiinnovator See projects at www.TIstemProjects.com Contact STEM-team@ti.com with questions

  2. Write a program to help Rover escape New Program: Task: Use the ranger to find the opening in a set of boxes and have Rover escape through the opening. You will need to read the heading for each turn and compare the ranger measurements to determine where the opening is.

  3. Some questions to think about What will Rover measure? How will you instruct Rover look for a gap? How will Rover know there is a gap? Will you have Rover escape as soon as a gap is detected or will you look at all the options before deciding where to drive? How will Rover remember the location of a gap? How will you instruct Rover to drive through a gap? Are there patterns in the Rover behavior that your program can adjust for? What will you do if there is no gap in the wall?

  4. Write your own program Purpose Name What is the purpose of your program? What is the name of your program? Inputs Variables Calculations and Control Statements What calculations will you need? What conditional logic statements will you need? What loops will you need? What input values or measurements will you need? What variables will you need? What will you call them? Outputs What values will you print? What physical outputs will you make? Modules: What modules (if any) do you need to import?

  5. BUILDING UP TO THE FINAL CHALLENGE

  6. How far away is that? Task: Use the Rover ranger to detect distance to an object and display the distance on the screen What is the unit of measurement reported by the ranger? New Program: What distance measurements do you see when the Rover is pointed at different places on the enclosure wall? Find rv.ranger_measurement() on the TI-Rover 3:Inputs menu What distance measurements do you see when Rover is pointed at a gap in the wall? Store a value to a variable with = Find print() on the Built-ins 6:I/O menu

  7. Am I close or far? Task: Use the Rover ranger to detect distance to an object, print the distance. New Program: Have the Rover decide if the object is far away. Print an alert message. Try different values for the whatisfar variable. Find the if statement [menu] Built-ins 2:Control 1:if..: If the logic statement at the beginning of the if block is true the program runs the block. If the logic statement is false, then the block is skipped. The block starts with a colon and includes all of the indented statements. The value for the variable whatisfar determines what is considered to be far or close. The print() function can take multiple inputs separated commas. Text strings are a set of characters enclosed in quotes. The exact characters are printed. The quote symbol is entered on the keyboard by [ctrl] [multiple] A variable name refers to a value. The current value of the variable is printed.

  8. Task: Use Rover to turn the hours of a clock. Make Rover turn clockwise and stop on every hour of the clock for a 12 hour clock. Print the current time. What time is it? New Program: What angle should the Rover turn to stop at twelve hour marks? Why do we print n+1 for the current hour? Put the Rover inside your room. Add statements to measure and print distance to the wall at each hour. What patterns do you see in the measurements? If you finish early, create a way to show a 24 hour clock. Import the time module at [menu] A:More Modules 2:Time to have access to the sleep() function. Find sleep() on the TI-Rover 7:Commands menu The sleep() function pauses the program for the number of seconds of the input value in parentheses Find the for loop statement [menu] Built-ins 2:Control 4:for index in range(size): A for loop repeats a block of code a known number of times set by the value of the range size. The loop repeats statements in the indented block beginning with a colon. The index variable n begins at zero and increases by 1 after each loop. Looping stops when n is equal to or greater than the loop size.

  9. Watch Out!!! New Program: Task: Drive Rover at an object and stop prior to the collision. Use the ranger to detect when Rover is within 20 cm (.2 meters) of an obstacle and stop. Try different values for the stop distance. Find the while loop statement [menu] Built-ins 2:Control 8:while..: A while loop repeats a block of code as long as the initial condition is true. The number of repetitions is unknown. The loop repeats statements in the indented block beginning with a colon. The loop continues to repeat as long as the initial statement checks as true. When the loop stops, the program moves on to the line just after the loop The print() function can take multiple inputs separated by commas. Text strings are a set of characters enclosed in quotes. The exact characters are printed. The quote symbol is entered on the keyboard by [ctrl] [multiple] A variable name refers to a value. The current value of the variable is printed.

  10. FINAL CHALLENGE

  11. Escape now Task: Use the Rover ranger to detect a gap in the wall and drive through it. New Program: What is the distance measurement when Rover is pointed at a gap in the wall. Are there patterns in the Rover behavior that your program can adjust for? How would you modify your program to handle the situation when there is no gap?

  12. Drive through the maximum gap New Program: Task: Use the Rover ranger to detect the maximum gap in the wall and drive through it. Are there patterns in the Rover behavior that your program can adjust for? How would you modify your program to handle the situation when there is no gap?

  13. FINAL CHALLENGE EXAMPLES

  14. Escape now Task: Use the Rover ranger to detect a gap in the wall and drive through it. New Program: What is the distance measurement when Rover is pointed at a gap in the wall. Are there patterns in the Rover behavior that your program can adjust for? How would you modify your program to handle the situation when there is no gap?

  15. Drive through the maximum gap New Program: Task: Use the Rover ranger to detect the maximum gap in the wall and drive through it. Are there patterns in the Rover behavior that your program can adjust for? How would you modify your program to handle the situation when there is no gap?

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#