דלג לתוכן

Lesson 14: The car park gate

English

A gate that counts

  • At a car park the driver presses a button, the arm goes up, and the car drives in.
  • The arm is a servo motor. gate.write(90) turns it to 90°, gate.write(0) turns it back.
  • The Arduino also counts the cars. When the car park is full, the gate stays closed and a red light says FULL.

Words for this lesson

Word Meaning
servo a motor that turns to an angle you choose and stays there
gate arm the long bar that stops cars
count add 1 each time something happens
global variable a variable made outside setup() and loop(); it keeps its value
full there is no free place left

היכנס או צור חשבון

IGCSE, A-Level & AP