Thames & Kosmos Robotics Workshop handleiding
Handleiding
Je bekijkt pagina 16 van 68

PROGRAMMING
SAMPLE PROGRAM FOR THE TURTLE ROBOT
Use this program to make the ultrasonic turtle robot walk forward. Build the robot and test out
the program. Then try modifying the program so that the turtle robot is able turn left or right.
Try building a simple maze for your turtle robot using objects such as books or paper cups. Then
write a program to drive the turtle robot through the maze without bumping into anything.
This program and all of the programs in this manual are preloaded in the app in the Load Demo
Code menu.
Loop
The green block is what is known as a loop. A
loop in a program repeats the instructions
within it over and over again, sometimes
infinitely! This loop will repeat the blocks that
are within the green bracket 10 times. Loops
are used to simplify code so that you do not
have to rewrite the same instructions over and
over again. Imagine writing these steps 10
times!
This blue block of code tells the robot to go
forward by turning on motor 1 and motor 2.
The motors need to turn in opposite directions
to move the robot forward because of the way
that the gears connect to the wheels in the
model. These blocks of code are repeated by
the loop 10 times.
How would you modify this
program to make the robot
turtle turn left or right?
Because this block is outside of the loop, it
only repeats once. This block tells the motors
to turn off.
Scan this QR code to view
online tech support videos
of the models in action.
14
Bekijk gratis de handleiding van Thames & Kosmos Robotics Workshop, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.
Productinformatie
Merk | Thames & Kosmos |
Model | Robotics Workshop |
Categorie | Niet gecategoriseerd |
Taal | Nederlands |
Grootte | 55434 MB |