Software Engineering › Key terms › Y11 Mechatronics › Control algorithm pattern (line follower)
Control algorithm pattern (line follower)
Code pattern Check Y11 Mechatronics
Definition
A closed-loop loop: WHILE the robot is running, read the sensor, IF the sensor sees dark THEN turn one way ELSE turn the other, ENDIF, ENDWHILE.
Example
WHILE on: read light; IF dark THEN turn left ELSE turn right.Check this one: Not found word-for-word in the supplied syllabus, specifications, marking guidelines or notes; the definition is standard computing knowledge, so check it against your class notes.
Where it is used in the test
Syllabus area: Y11 Mechatronics.
Question types it can appear in
- Pseudocode: Write a control loop
- Code reading: Code or algorithm reading: interpret a fragment and state its output or purpose.
- Multiple choice: Pick the option that matches the definition or example.
No past question in this bank is linked to this term yet. It can still be tested through the question types above.
Study links
- Flashcard: Control algorithm pattern (line follower) in Programming Mechatronics (Year 11) · study that set
- Memorise: Mechatronics: hardware, sensors, actuators, control
How to use it in an answer
A model sentence
Code pattern: “A closed-loop loop: WHILE the robot is running, read the sensor, IF the sensor sees dark THEN turn one way ELSE turn the other, ENDIF, ENDWHILE.” Then apply it: WHILE on: read light; IF dark THEN turn left ELSE turn right.
In a short answer, give the definition in your own words first, then tie it to the situation in the question. Do not copy the example above unless it fits the scenario.
Technique for the question types
- Pseudocode: Write HSC-style pseudocode: capital keywords, paired END words, indentation; initialise variables; output the required result.
- Multiple choice: Read all four options, rule out wrong ones, pick one; no penalty for guessing so never leave blank.
Common mistakes
- Check the sources: Not found word-for-word in the supplied syllabus, specifications, marking guidelines or notes; the definition is standard computing knowledge, so check it against your class notes.
- Pseudocode questions (2025 HSC exam Q17): use pseudocode control structures accurately; iterate an array and sum it; apply relational operators correctly; use the stimulus to choose the right structures.
- Use the term exactly as the syllabus words it, then link it to the scenario in the question; the 2025 feedback repeatedly rewards using the stimulus.
- Answer the command word: outline gives main points only, explain gives a reason or cause, discuss gives both sides.
Related terms
Same group in the syllabus: Diagnostic data · Optimisation data · Degrees of freedom · Motion constraints · Subsystem (combination of sensors, actuators and effectors) · Power, battery and material requirements · Wiring diagram · Specialist requirements for people with disability · Open-loop control · Closed-loop control · Feedback · Autonomous control · Simulation and prototype · Unit tests for control algorithms