Download presentation
Presentation is loading. Please wait.
1
Recap the basics Lesson 1
2
Starter What is meant by the term “humanoid robot”?
Where are the blocks stored to control Edbot in Scratch? How can you run your programs with Edbot? What is a servo?
3
What is this unit about? In this unit you will continue writing programs to control Edbot. We will recap what you learnt in the first unit and then extend this into looking at more elaborate programming techniques.
4
Objective of the lesson
Recap the basics of programming with Edbot All of you will: Explain what is meant by the term “humanoid robot” Control Edbot with simple commands Most of you will: Make Edbot’s servo lights change colour Add script for separate sprites to allow Edbot to be controlled by clicking on the sprites Some of you will: Explain the difference between a forever and a repeat loop
5
How much do you remember?
Open L1_Recap.sb2. The program has been started but remember to change the name to the name your class is using: Write a program which will make Edbot walk forwards and then wave its arm 3 times. It should keep doing this until the program is stopped. When you are ready to test your program raise your hand and your teacher will connect the Edbot software to your computer so you can run the program with Edbot.
6
The answer The most efficient program is shown here.
What does the forever loop do? What does the repeat loop do?
7
Servos Change your program so that after Edbot stands in the initial position it should make the lights on its left arm light up for 1 second BEFORE it starts the loops.
8
The answer Here we have added the code to switch the correct servo lights on and after 1 second switch them all off again before we start on the forever loop.
9
When the sprite is clicked…
Turn right Turn left Kick ball Walk forward Sidestep right Walk backwards Sidestep left Do push-ups Reset (This will stop the current command) Sprites What is a sprite? Open the program called L1_FootballSprites.sb2. You need to complete the program. On the stage also add some script so that when the green flag is clicked it will set Edbot into the initial position.
10
Self-assessment Write your name and class at the top of the sheet.
Read the highlighted points and tick those that you feel you have achieved.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.