Garage Door Controller

On an Arduino Nano 33 BLE, run a garage door from one remote button, stop it at the limit switches, send a closing door back up when the photo-eye beam breaks, and raise a fault when the door jams.

Carte
Nano 33 BLE · Arduino
Difficulté
Moyen
Thème
Applied Integration
Accès
Offre complète

La tâche

Garage Door Controller

A small door company builds operators for home garage doors. One remote button does everything: open, stop, close. A photo-eye across the opening protects children and cars: a closing door that sees something in the beam must go back up. If the door jams, the motor must not keep pulling. This is a programming exercise on an emulated board, not a certified safety function. Times are shortened for the bench.

Hardware

  • Arduino Nano 33 BLE (nRF52840, 3.3 V logic). Serial console on Serial1 (D0/D1), 115200 baud. Serial is USB and is not seen by the tests.
  • D2: remote receiver output, LOW while the remote button is held. A press counts once, after 20 ms without a break, however long the button is held.
  • D3: OPEN limit switch, D5: CLOSED limit switch. Each closes to GND (LOW) while the door is at that end.
  • D6: photo-eye receiver, LOW while the beam is broken.
  • Use the internal pull-ups on all four inputs. Limits and photo-eye act on the first LOW reading.
  • Motor relays: D4 UP, D8 DOWN, HIGH = on. D9: FAULT LED with a series resistor to GND, HIGH = lit.

Write the sketch in sketch/sketch.ino. In setup() open Serial1 at 115200 baud, switch all outputs off, print READY, then print the start-up state (requirement 1). Never block the main loop with delay(): every input is read all the time.

Voici le début de la tâche. Connectez-vous avec l'offre complète pour lire la suite et la résoudre.

Ce que vous obtenez

  • Votre firmware est compilé et exécuté sur une carte émulée, puis vérifié par des tests matériels.
  • Une explication écrite de la solution.
  • Aucune carte de développement ni toolchain locale requise.

Débutant en embarqué ? Commencez par la feuille de route : Apprendre les systèmes embarqués (en anglais)