Download presentation
Presentation is loading. Please wait.
Published byClare Gregory Modified over 7 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
Sending a 1 to a pin turns it on and sending a 0 turns it off.
Pins The BBC micro:bit sends signals through its pins to control Bobbot’s motors. Pin Controls 16 Right Motor Forward 12 Left Motor Forward 8 Right Motor Backward Left Motor Backward Sending a 1 to a pin turns it on and sending a 0 turns it off.
8
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
9
Touch Develop You are going to use the Touch Develop programming language to program Bobbot. Click this button to download your program. Once downloaded you will need to copy it onto the micro:bit
10
Place a screenshot of your code here:
Activity 4 Use Touch Develop to create the program you designed in activity 3 and test it on Bobbot. Place a screenshot of your code here:
11
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. Add code here to move forward for 2 seconds and stop. Place a screenshot of your code here: Add code here to stop moving backwards.
12
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
13
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
14
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:
15
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.