Arduino Sensor Code for Food-Safety Temperature Alarms

For US and UK restaurant, café and food-truck owners with an Arduino Uno and a 10k NTC probe. The same reading can pass in one country and fail in another.

Probe prints ADC 708 · 10 kΩ series · R25 10 kΩ · Beta 3950
7.8°C / 46.1°F
US FDA Food Code 2022 · cold holding 41°F (5°C)FAIL
England 2013 Regulations · chill holding 8°CPASS

Paste into ColdHoldAlarm for your probe and rule:


Check your own probe

No ADC number yet? Upload the built-in example File ▸ Examples ▸ 03.Analog ▸ AnalogInOutSerial or any sketch that prints analogRead(A0). Menu names differ between IDE versions and UI languages.

Wiring (all 6 sketches, Arduino Uno)

PinConnectUsed by
5V → 10 kΩ → A0Fixed series resistor from 5V to A0all probe sketches
A0 → probe → GND10k NTC thermistor probe between A0 and GNDColdHold, Freezer, HotHold, CoolingLog, IceCalibration
D13Alarm / FAIL LED (on-board LED works)all
D12Green PASS LED + 220 Ω to GNDCoolingLogTimer
D8Active 5V buzzer + (− to GND)ColdHold, Freezer, HotHold, CoolingLog, DoorAjar
D2Push button to GND (reset / START), internal pull-upColdHold, Freezer, HotHold, CoolingLog, DoorAjar
D3Door reed switch to GND, magnet on the doorDoorAjarAlarm

What the 6 sketches do that a tutorial does not

SketchRuleDevice a tutorial omits
ColdHoldAlarmFDA 41°F (5°C) or England 8°C10-min door grace · 0.5°C hysteresis · latched alarm · probe-fault alarm · CSV log
FreezerAlarmEU -18°C, 3°C fluctuationTells a 45-min defrost from a failure · instant alarm above -15°C
HotHoldAlarmFDA 135°F (57°C) or England 63°C5-min lid grace · 1°C hysteresis · latch
CoolingLogTimerFDA 135°F→70°F in 2 h, →41°F in 6 h totalClock starts only when hot food falls through 57°C · prints the failed stage
ProbeIceCalibrationFDA ±1°C thermometer accuracyWaits for 60 s stable reading · prints the offset line to paste
DoorAjarAlarm—Debounced reed switch · 3-min latch · hourly open count

Install: unzip as is (each .ino sits in a folder with the same name) ▸ open it in Arduino IDE ▸ pick board Arduino Uno and your port ▸ Upload. Libraries: none, built-in Arduino core only. Every sketch was compiled with arduino-cli for arduino:avr:uno. Hardware is not included.

Open full tool → getreadystack.com