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
- Difficulty
- Medium
- Topic
- Data Handling & Algorithms
- Access
- Full plan
The task
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.
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