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.
- Board
- Nano 33 BLE · Arduino
- Difficulty
- Medium
- Topic
- Applied Integration
- Access
- Full plan
The task
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.Serialis USB and is not seen by the tests. - D2: remote receiver output,
LOWwhile 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,
LOWwhile the beam is broken. - Use the internal pull-ups on all four inputs. Limits and photo-eye act on the first
LOWreading. - 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.
This is the opening of the task. Sign in with the full plan to read the rest and solve it.
What you get
- Your firmware is built and run on an emulated board and checked by hardware-level tests.
- A written walkthrough of the solution.
- No development board or local toolchain needed.
New to embedded? Start with the roadmap: How to learn embedded systems