Title: An Intro to Robots: One Way To Use Computer Programming
1An Intro to Robots and Computer Programming
2What is programming?
- How we communicate with the computer so that it
can do what we want it to do. - In order to do this, we have to learn a language
that it recognizes and understands. - Our objective to learn how to program a robot so
that it will move the way we tell it to.
3The Robot and its components
Sound sensor
The main computer part where all the programs
are stored.
UV sensor
Light sensor
Touch sensor
4(No Transcript)
5THE BLOCKS AND WHAT THEY MEAN
Move forward, backwards, or turn at any angle
Record or play sounds
Sound.Play sound file or tone
Display an image on the screen
Wait.use sensors on robot to trigger next task
Loopused to repeat the same task multiple times
Switchequivalent to an if statement If
this happens, do this action. Else, do another
action.
6How to Program the Robot
- Drag the block onto the grid, making sure it
connects with the previous block - Connect the block in the order you want the robot
to do the action- - If you want to use the loop button, put all the
steps you want the robot to repeat within the
box. - If you want to use the switch button, make sure
you define what you want the robot to do in
each instance.
7(No Transcript)
8What to do when your code is complete
- Hook the robot up to the computer using the USB
cable given. - At the bottom right hand corner of the grid,
there are a set of buttons that look like this
Used to view files stored in the robot
Used to download a program to the robot.
Used to stop running the program.
Used to test out the program by downloading the
program and playing it right away (USB will still
be attached).