Previous page View a printable version of this page Go back to the contents page for this topic Using Variables to Store Data Next page
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.

Previous page Page 5 of 6 Next page