Beruflich Dokumente
Kultur Dokumente
Introduction: 15 min.
The job of every programmer is to:
1. Analyse the requirements of a problem
2. Create specifications/requirements – stressing on inputs/outputs
3. target for a solution
Task part 1:
Use the brick to generate a Tone 8 min.
Program requirements
The brick is programmed to emit a beep.
Learning outcomes:
• Students learn how to draw a flowchart and understand how it works by putting it
immediately into practice.
• Students will familiarise with the brick’s onboard screen, interface and programming
features
Stop
Use the brick’s inbuilt functions to convert the flowchart into a working program:
Task part 2:
Program requirements:
Building on the program of Task 1, add the necessary steps so that
the brick will emit a siren tone. Start
Learning outcomes:
• As per Task part 1 continued
• Students will understand the concept of a ‘loop’ in a program Generate
and putting it into practice. Tone 1
Output
Group Exercise: Sound
Put the following steps in order and use 6 flowchart symbols to draw
them in a flowchart:
Generate
Generate Generate Output Tone 2
Tone 2 Tone 1 Tone 1
Output Start Connector
Tone 2 Output
Sound
o Correcting the flowcharts.
Use the brick’s inbuilt functions to convert the flowchart into a working program and run it:
Task part 3:
Use the ultrasonic sensor to activate an alarm when something/someone moves
near 20 min.
Program Requirements:
Alarm beeps when activated, waits for ultrasonic sensor to Start
detect intruder.
Learning outcomes:
• Practise of skills learnt in previous tasks Generate
• Learning the concept of a ‘decision’ in flowchart Tone 1
terminology.
Output
Group Exercise: Sound
Generate
Correcting the flowchart. Tone 2
Explanation:
the small loop is an example of Repeat Until in Output
Sound
programming.
Assembled robot moves back and forth between two obstacles 25 min.
Program Requirements:
The robot needs to reverse until it hits something, move Start
forward until it senses something (object), then continue
moving back and forth between two obstacles (loop the
above).
Reverse
Learning outcomes:
• Learn how to draw a flowchart with less help
provided
• Practice the skills learnt in previous tasks Touch
Sensor
input
Exercise:
Move forward
Converting the flowchart into a working program:
Ultrasonic
Sensor
input
y Hit
something
?
Conclusion: 7 min.
What is the flowchart symbol for Start / Stop?
What is the flowchart symbol for Input / Output?
What is the flowchart symbol for a process?
What is the flowchart symbol for Decision?
How many inputs does a decision have?
How many outputs does a decision have?
What do we use to connect two flow of control lines (arrow lines)?
What is a repeated sequence in a program called?