‘An Algorithm is a set of steps to solve a problem. Algorithms must have their steps in the right order’

info-processing.jpg


Lesson 1

LO: TBAT identify flowchart symbols and understand how they are used to describe systems

basic-symbols

LO: TBAT develop a control flowchart solution for a simple problem

Task 1

Create an ‘Algorithms’ folder within your ‘Computer Science’ Folder. This is where your will save all your work over the next few weeks. This should be kept organised at all times!!

Look at the picture below and put the instructions on the following worksheet in the correct order. Save this in the folder that you have just created under a logical name.

Zebra Crossing Worksheet

picture1

Task 2 (Zebra Crossing Mimic)

Load up Flowol 4 and get the Zebra Crossing Mimic to work like the completed example below….

picture2

Completed Example

Task 3 (Crossing Patrol Mimic)

Load up Flowol 4 and get the Crossing Patrol Mimic to work like the completed example below….

picture3

Completed Example


Lesson 2

LO: TBAT use decomposition when solving a problem

LO: TBAT develop a control solution for a system that uses two flowcharts operating in sequence

Task 1

Watch the video below and the complete the following task sheet. This should then be saved in your ‘Algorithms’ folder under a logical name.
Traffic Light Sequences

Task 2 (Bridge Lights)

picture4

This mimic has two sets of traffic lights that need to play in sequence so lets break the problem down into smaller chunks (Decomposition)…

  • Create a control flowchart for the first set of lights that plays on sequence like to example below:
  • Now create a second control flowchart for second set of light like the example below:

Lesson 3

LO: TBAT Identify common types of sensors used in control systems

LO: TBAT use decision symbols in a flowchart

LO: TBAT develop a control solution for a system that uses multiple sensors

Task 1 (Automatic Home)

picture1

Complete each of the tasks below to help automate the home in the Automatic Home mimic:

1.1 Make the fan switch on automatically if the temperature in the room goes above 23°C.

1.2 Make the fire switch on automatically if the temperature in the room goes below 17°C.

1.3 Make the inside lamp switch on automatically if the light level (Sun) falls below 20.

1.4 Add a sound to a mimic using the Sound symbol. Make the doorbell chime if the grey door button is pressed. You can use the Doorbell.wav file for this task.

1.5 Make the security light above the door turn on automatically if the light level (Sun) falls below 30 AND the security sensor is on.

1.6 Make the garage door open and close when the red Open and Close buttons are pressed.

Task 2 (Green House)

picture2

Complete each of the tasks below to help automate the home in the Greenhouse mimic:

2.1 Create a flowchart to turn the Heater ON if the temperature is less than 10 and turn the Heater OFF if the temperature is greater than or equal 10.

2.2 Create a flowchart to turn the Light ON when light from the Sun is less than 20 and turn the Light OFF when light from the Sun is greater than 50.

2.3 Create a flowchart to turn the Sprinkler ON for 5 seconds if the low moisture sensor is ON.

Tasks 4, 5 and 6 require the use of subroutines and which will be covered in lesson 4 but see if you can figure it out…

2.4 Create a subroutine flowchart to OPEN the Window.

2.5 Create a subroutine flowchart to CLOSE the Window.

2.6 Create a flowchart to OPEN the Window when the temperature is greater than 20 and CLOSE the Window when the temperature is less than 20.


Lesson 4

LO: TBAT develop a control solution for a system that includes a subroutine

LO: TBAT understand how the use of subroutines can make programs more efficient

What is a Subroutine?

  • Mini program within another program
  • Does a specific task
  • Main program ‘calls’ the sub-program

Task 1 (Pelican Crossing)

picture3

Use a subroutine to make a light flash

Task 2 (Pelican Crossing) pelican-mimic

Complete the pelican crossing mimic. See if you can break down the problem into small sub routines.