Перейти к содержанию

Lesson 30: Fridge door alarm

English

The door is open!

  • Many fridges beep when the door stays open, because the cold air goes out and food can go bad.
  • A light sensor inside sees when the door is open. The Arduino measures how long it has been open with millis().
  • Opening the door for a moment is fine: the alarm waits 3 seconds first.

Words for this lesson

Word Meaning
alarm a sound that warns you
timer something that measures how much time has passed
log a list of what happened
! NOT: !wasOpen is true when wasOpen is false

Войти или создать аккаунт

IGCSE, A-Level & AP