Phoenix

You inherited a temperature monitor that talks to an I2C sensor (address 0x48, register 0x00). The host drives it: every time a trigger byte arrives over UART, the firmware takes one reading and prints TEMP:<reading> (the value in decimal degrees). After the last reading it prints DONE.

The code works on the bench, but in the field the board experiences intermittent brownouts that reset peripheral registers to their default values mid run. When that happens, the next reading is supposed to come back exactly as before, but the firmware stops behaving correctly until a full restart.

Make the firmware survive a brownout: it must keep producing correct readings for every trigger, including the ones that arrive after the supply dips, without a system reset.

Three triggers arrive per run, and the sensor returns the same value each time, so a healthy run prints one TEMP:<reading> line per trigger (all three identical) followed by a single DONE line.

Find and fix all the bugs.

Loading the interactive arena.