Download presentation
Presentation is loading. Please wait.
Published byHope Atkins Modified over 6 years ago
1
Sequencing Learning Objective: to be able to design algorithms that use sequencing.
2
This is Bobbot, a robot that is controlled by the BBC micro:bit.
You are going to be using it to help you learn key Computer Science concepts.
3
LeftMotor.forward(on) RightMotor.forward(on)
Algorithms An algorithm is a set of steps that can be followed to solve a specific problem. Algorithms can be represented in a number of ways, these include: Flowcharts Start Stop Left Motor Forward On Right Motor Forward On Pseudocode LeftMotor.forward(on) RightMotor.forward(on)
4
Flowcharts Start / Stop Input / Output Decision Process
Flowcharts allow us to design algorithms using symbols. These are the main symbols used in flowcharts: Start / Stop Input / Output Decision Process
5
Predict what this algorithm will do: Right Motor Forward Off
Activity 1 The simplest type of algorithm takes the form of a sequence. Start Left Motor Forward On A sequence is a set of instructions that are carried out once in the order they appear. Right Motor Forward On This is an example of a sequence: Delay 2 Predict what this algorithm will do: Left Motor Forward Off Prediction: Right Motor Forward Off Stop
6
Fill in the blanks to complete the algorithm:
Activity 2 This is the design for an algorithm that makes the Bobbot go forward for 5 seconds, then backward for 5 seconds before stopping. Fill in the blanks to complete the algorithm: Start Left Motor Backward On Left Motor Forward On Right Motor Forward On Delay 2 Delay 2 Stop
7
Right Motor Forward Off
Activity 3 An algorithm is turned into a computer program by writing it in program code. Match the lines of program code to the algorithm: Start Left Motor Forward On Right Motor Forward On Delay 2 Left Motor Forward Off Right Motor Forward Off Stop
8
Mu Editor You are going to use the Mu editor to program your micro:bit. Click this button to load your program onto your micro:bit You always need this line at the start of every program. You also need these lines, they assign easy to remember names to each of the micro:bit pins that control Bobbot.
9
Place a screenshot of your code here:
Activity 4 Use the Mu editor to create the program you designed in activity 3 and test it on Bobbot. Place a screenshot of your code here:
10
Activity 5 Here is part of the program code for the algorithm from activity 2. You need to complete it by adding the missing code. Place a screenshot of your code here: Add code here to move forward for 2 seconds and stop. Add code here to stop moving backwards.
11
Right Motor Forward Off
Turning You can turn Bobbot by making only one of the motors go forward. For example if you want to turn left then you can make only the right motor move forward. Start Stop Right Motor Forward On Delay 1 Right Motor Forward Off
12
Right Motor Forward Off
Activity 6 Complete this algorithm for Bobbot that is designed to make it move forward, turn left and move forward again before stopping. Start Left Motor Forward On Right Motor Forward On Delay 2 Right Motor Forward Off Stop Delay 1
13
Place a screenshot of your code here:
Activity 7 Turn the algorithm you designed in activity 6 into a program and test it on Bobbot. Place a screenshot of your code here:
14
Place a screenshot of your code here:
Extension Adapt your program from activity 7 to make Bobbot move to form a square pattern. Place a screenshot of your code here:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.