Machine Event Log Ring Buffer
On an Arduino Nano 33 BLE, build a black-box recorder for a packaging machine: debounce jam and guard-door events, keep the 8 newest in a ring buffer with timestamps, dump them oldest first on request, and clear the log with a long press.
- Board
- Nano 33 BLE · Arduino
- Schwierigkeit
- Mittel
- Thema
- Data Handling & Algorithms
- Zugang
- Vollständiger Plan
Die Aufgabe
Machine Event Log Ring Buffer
A cartoning machine on a packaging line sometimes stops for no clear reason. The maintenance team fits a small black-box recorder: it notes every jam sensor trip and every guard-door opening with a timestamp, keeps the most recent ones in a fixed amount of memory, and prints them for the technician on request.
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: jam sensor (event J), D3: guard-door switch (event G). Each closes to GND when its event happens. Use the internal pull-ups:
LOW= active. - D5: technician's DUMP button to GND,
LOW= pressed. - D4: LOG FULL lamp (LED with a series resistor to GND),
HIGH= on. - All three contacts bounce for a few milliseconds.
Write the sketch in sketch/sketch.ino. In setup() open Serial1 at 115200 baud, start with an empty log and the lamp off, then print READY. Never block with delay(): all three inputs are watched all the time.
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)