Three-Floor Elevator Controller

On an Arduino Nano 33 BLE, control a small three-floor lift: remember floor calls, keep the car's direction and stop at called floors on the way, time the travel and the door, and drive the indicator panel lamps correctly.

Board
Nano 33 BLE · Arduino
Schwierigkeit
Schwer
Thema
Timing & Program Flow
Zugang
Vollständiger Plan

Die Aufgabe

Three-Floor Elevator Controller

A shop on three floors installs a small goods lift. Staff call it with one button per floor. A naive controller serves calls in the order they were pressed and makes the car shuttle past floors where someone is waiting. This one must work like a real lift: keep going in its direction and stop on the way. Times are shortened for the bench, and this is a programming exercise on an emulated board, not a certified lift controller.

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.
  • Call buttons for floors 1, 2, 3 on D2, D3, D5, each to GND. Use the internal pull-ups (LOW = pressed). A press counts once, after 20 ms without a break, however long the button is held.
  • Lift indicator panel (lamps with resistors on board, HIGH = on): floor lamps F1 on D4, F2 on D6, F3 on D8; UP arrow on D9, DOWN arrow on D10; DOOR lamp (door open) on D11.
  • The car takes 500 ms to move one floor. The door stays open for 700 ms.

Write the sketch in sketch/sketch.ino. In setup() open Serial1 at 115200 baud, set up the pins and the start-up lamps, then print READY. Never block with delay(): calls can come at any moment.

Das ist der Anfang der Aufgabe. Melde dich mit dem vollständigen Plan an, um den Rest zu lesen und sie zu lösen.

Was du bekommst

  • Deine Firmware wird auf einem emulierten Board gebaut, ausgeführt und durch Hardware-Tests geprüft.
  • Eine schriftliche Erklärung der Lösung.
  • Kein Entwicklungsboard und keine lokale Toolchain nötig.

Neu bei Embedded? Starte mit der Roadmap: Embedded-Systeme lernen (Englisch)