Raspberry Pi practice problem · Sensors
Rate of rise
HardBudget $7Python · gpiozero
A DS18B20 on GPIO4 (4.7 kΩ pull-up, or the probe module) and a red LED on GPIO17. Real heat detectors raise the alarm on a fast rise, whatever the starting temperature. Keep the readings of the last 3 seconds; when the newest one is more than 5 °C above the lowest of them, light the LED and print FIRE once. The alarm then stays on.
The test warms the room slowly — 1 °C per second from 20 °C to 32 °C — cools it to 25 °C at 14 s, then heats it fast: 28 °C at 16 s and 31 °C at 17 s. Only the last rise is fast (and it never gets as hot as the slow one).