Pearson Edexcel · GCSE · Design and Technology
Course version: 1DT0 · Version from Sept 2017
How to use simple routines to control outputs with delays, loops and counts.
Full specification wording
The use of programmable components to embed functionality into products in order to enhance and customise their operation: 1.7.4 How to use simple routines to control outputs with delays, loops and counts.
A simple routine is a short ordered set of instructions a programmable component repeats to drive an output such as an LED, buzzer or motor.
- Point 5 of 5
Study notes
From the teaching notes for this specification point.
The idea
A simple routine is a short ordered set of instructions a programmable component repeats to drive an output such as an LED, buzzer or motor. A delay pauses the routine for a set time, so a flashing lamp stays on then off for measured intervals. A loop repeats a block of instructions, either forever or a fixed number of times, so the output keeps cycling without the programmer rewriting each step. A count uses a variable that increases or decreases each pass, letting the routine stop after a set number of flashes or steps. Combining all three, a routine can switch an output on, wait, switch it off, wait, add one to the count, then test whether the target count is reached before looping again.
What earns the marks
- Identifies that a delay pauses the routine for a set period before the next instruction runs.
- Explains that a loop repeats a block of instructions, either indefinitely or a set number of times.
- States that a count uses a variable increased or decreased on each pass to control repetition or stopping.
- Recognises that combining delay, loop and count lets an output switch on and off a set number of times.
- Describes how a routine orders instructions so each output action follows the previous one.
Common mistakes and how to put them right
Confuses a delay with a loop.
Put it right: Keep the pause as a timed wait and the loop as the repeated block.
Assumes a loop always runs forever.
Put it right: Note that a count can end the loop after a set number of passes.
Treats a count as a fixed time.
Put it right: The count tracks repetitions, not seconds.
Exam tips
- Read the whole routine in order before choosing an answer, tracking each instruction in sequence.
- Match each keyword to its job: delay for time, loop for repetition, count for number of passes.
- Check whether the question asks what happens once or what repeats, then select accordingly.
Try the lesson
The start of the The use of programmable components to embed functionality into products in order to enhance and customise their operation: 1.7.4 How to use simple routines to control outputs with delays, loops and counts. lesson, made from teaching notes for this specification point.
Have a go first
A program must flash an LED on and off repeatedly while a product is running. Which programming structure repeats the on-and-off steps?
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of The use of programmable components to embed functionality into products in order to enhance and customise their operation: 1.7.4 How to use simple routines to control outputs with delays, loops and counts.
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge