8

What 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

  • View
    218

  • Download
    2

Embed Size (px)

Citation preview

Page 1: What 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
Page 2: What 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

What 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.

Page 3: What 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

The Robot and its components

The main computer part; where all the programs are

stored.

Light sensorTouch sensor

UV sensor

Sound sensor

Page 4: What 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
Page 5: What 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

“Move” forward, backwards, or turn at any angle

“Record” or “play” sounds

“Display” an image on the screen

“Wait”….use sensors on robot to trigger next task

“Loop”…used to repeat the same task multiple times

“Switch”…equivalent to an ‘if’ statement…

If this happens, do this action. Else, do another action.

“Sound”….Play sound file or tone

THE BLOCKS AND WHAT THEY MEAN…

Page 6: What 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

How 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.

Page 7: What 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
Page 8: What 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

What 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 test out the program by downloading the program and playing it right away (USB will still be attached).

Used to stop running the program.