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.

Placa
Nano 33 BLE · Arduino
Dificultad
Media
Tema
Data Handling & Algorithms
Acceso
Plan completo

La tarea

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. Serial is 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.

Este es el inicio de la tarea. Inicia sesión con el plan completo para leer el resto y resolverla.

Qué incluye

  • Tu firmware se compila y ejecuta en una placa emulada y se comprueba con pruebas a nivel de hardware.
  • Una explicación escrita de la solución.
  • No necesitas placa de desarrollo ni toolchain local.

¿Nuevo en embebidos? Empieza por la hoja de ruta: Cómo aprender sistemas embebidos (en inglés)