Responding to Sensor Readings
A variable can be used to store a number or some text in a control program.

Example of a Burglar Alarm Control System

Burglar alarms use sensors to set the alarm off if there is an intruder:

The computer program won’t set the alarm off however if the user has entered the correct code into the alarm box to tell it to deactivate. The flowchart below describes how the control program works. It has been split into sections to make it easier to understand.

Notice that it uses information from two inputs – the infra-red movement sensor and the code that has been entered into the alarm box.

Made by Mr S Haughton