Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Creating an autonomous vehicle

      Lesson details

      Learning outcome

      I can synchronise components and systems.

      Key learning points

      1. LEDs can be used for lighting, signals or effects.
      2. Multiple outputs can be controlled sequentially.
      3. Code can be used to synchronise systems through logic and timing.
      4. Modular code can be used to improve system management.

      Keywords

      • Vehicle - a machine used for transporting people or goods

      • Autonomous - something that operates independently without human intervention

      • Synchronise - when two or more things work together in a certain way

      Common misconception

      The microcontroller controls all systems at the same time.

      In reality, most microcontrollers execute code sequentially, one line at a time. It may appear that microcontrollers are doing many things at once, but they’re actually switching between tasks quickly or handling them step by step.

      Teacher tip

      Encourage learners to build and test each system (LEDs, motors, sensors) one at a time, then gradually combine them using modular functions. Reinforce success at each stage before moving on.

      Equipment

      Pupils will need a microcontroller and software to program it. Examples in this lesson use the RPi Pico and Thonny https://oak.link/thonny

      Files needed for this lesson

      L6TaskBActivity3aSolutionV2 931 B (PY)

      L6TaskBActivity3eSolutionV2 2.93 KB (PY)

      L6TaskBActivity3bSolutionV2 931 B (PY)

      L6TaskBActivity3dSolutionV2 2.82 KB (PY)

      L6TaskBActivity3cSolutionV2 2.41 KB (PY)

      Download these files to use in the lesson.

      Licence

      This content is © Oak National Academy Limited (2026), licensed on Open Government Licence version 3.0
      except where otherwise stated. See Oak's terms & conditions
      (Collection 2).

      Lesson video

      Loading...

      Prior knowledge starter quiz

      6 Questions

      Q1.
      What do ultrasonic sensors use to measure distance?

      Correct answer: sound waves
      water waves
      light beams
      magnetic fields

      Q2.
      What is the role of a sensor in a system?

      stores information long-term
      powers the system
      Correct answer: detects or measures a physical property
      controls the speed of sound

      Q3.
      Which formula is used by ultrasonic sensors to calculate distance?

      distance = mass × acceleration
      distance = area × width
      distance = volume × density
      Correct answer: distance = time × speed of sound

      Q4.
      What device receives data from sensors to make decisions?

      Correct Answer: microcontroller

      Q5.
      What colour of surface reflects more infrared light?

      Correct Answer: white

      Q6.
      Match each action with its purpose:

      Correct Answer:emit infrared light,help detect surface contrast

      help detect surface contrast

      Correct Answer:send data to microcontroller,enable decision-making

      enable decision-making

      Correct Answer:calculate distance,work out how far away something is

      work out how far away something is

      Correct Answer:detect less reflection,identify dark surfaces

      identify dark surfaces

      6 Questions

      Q1.
      What is one common use for LEDs in a system?

      measuring temperature
      storing data
      producing sound
      Correct answer: lighting and signalling

      Q2.
      How can multiple outputs be controlled in a system?

      all at the same time, always
      by changing the power supply
      Correct answer: sequentially, one after another
      only using manual switches

      Q3.
      What is the term for a system that operates independently without human help?

      Correct Answer: autonomous

      Q4.
      Put these steps in order for synchronising LED outputs on a buggy:

      1 - write code for each LED
      2 - test each LED separately
      3 - combine code for all LEDs
      4 - run the full system and observe synchronisation

      Q5.
      What is the term for code that is organised into separate, manageable sections to improve system management?

      Correct Answer: modular

      Q6.
      What does modular code help with in a system?

      making the code longer
      slowing down the system
      Correct answer: managing and organising different parts
      removing all outputs

      To help you plan your 11 computing lesson on: Creating an autonomous vehicle, download all teaching resources for free and adapt to suit your pupils' needs...