![]() |
![]() | ||
| |||
![]() |
Programming a Robot | ![]() |
| Project Details |
|
Computers need to be to be told what to do. Very complicated activities need to be done one simple step at a time. A computer can do things quickly, but it can't do anything you haven't told it how to do. We do many things without thinking much about each step, like getting dressed or riding a bike. But in reality, all these activities are made up of tiny little steps that we've had to learn. If we were robots, someone would have to program each of these little steps before we could even think of riding a bike. So let's program a robot to butter a slice of bread. |
| Materials Needed |
|
Paper and a pencil. Later, to debug your program, you'll need a friend and, maybe, a kitchen. |
| Do It |
|
Your new robot looks a lot like you. It's the same size and everything. But since it just came out of the box, it doesn't know much. You'll have to tell it everything to do, one step at a time. Keep your commands simple. Some good commands would be: open hand, close hand, and grasp something. Try to imagine all the steps you would need to tell the robot to do in order to end up with a slice of buttered bread. Step1: Now write them down. Keep them simple so that anyone can read them. Be sure to put the steps in order! Try not to leave anything out. It's not as easy as it sounds, is it? Step 2: Now test your program with a friend. If you don't have a kitchen handy, pretend you're in one (that ought to be easy, since you're already pretending your friend is a robot). Your friend can't do anything you don't tell the robot to do. Like a robot, he or she must follow your instructions exactly. Read the steps exactly like you have written them out. (Laughing is allowed!) Step 3: Okay, now you know the bugs in your program. Fix them by changing your instructions to the robot. Test them again. Did it go smoother this time? Congratulations, you have just debugged your program. |
| Review It |
|
| Pursue It |
|
|
Activity: Conceptualizing a program Skill level: Beginning Project skill: Understanding how a computer works Life skill: Problem solving |
Date completed: Helper's initials: |
|
|
For
IFAS-related questions or information, please contact IFAS External Relations.
|