Commit Graph

18 Commits

Author SHA1 Message Date
Mateusz Kowalczyk
6abd900a8f Lower display brightness to probe peak-current freeze
Piotr observed the freeze correlates with digit '8' on the last
(units) tube position, regardless of which sensor is shown
(25.08 C, 48 %, 1018 hPa). '8' lights the most 14-seg segments of
any digit, and the units digit changes most often, so the last
position is both peak-current and the most-written-to. At brightness
15 (max) that peak current likely dips the supply / glitches the I2C
bus, which the in-ISR delay()/endTransmission() then turns into a
permanent hang.

This commit drops brightness 15 -> 4 as a cheap, reversible probe.
If freezes stop or get much rarer, the root cause is current/brownout
(fix: decoupling cap on display VCC, or separate supply, plus an I2C
bus-recovery/timeout) rather than purely the ISR timing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 02:13:55 +00:00
Mateusz Kowalczyk
0332b728e6 Move I2C work out of interrupt context to fix display freeze
The tube library calls delay(100) after every display write and the
BME280 library calls delay(100) when re-initializing after a failed
transfer. Inside the TC3 timer ISR the SysTick interrupt is blocked,
so micros() stops advancing past ~1ms and delay() can spin forever
when its start sample lands exactly at the bottom of the micros()
sawtooth. All clocks derive from the same 48MHz source, so the ISR
phase is locked and one specific code path (display update on a
falling temperature reading) hits the fatal window reproducibly.

ISRs now only raise flags; sensor reads, display updates and timer
rescheduling run from loop(), where delay() works normally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 01:37:18 +00:00
cryptogopher
c2af98d588 Display also humidity and pressure
Display update triggered by value change, not interval
2026-02-12 00:10:45 +01:00
cryptogopher
0c9a7a51d9 Add description, part list and build instructions 2026-02-07 18:01:00 +01:00
cryptogopher
6a0a954814 Update countdown 2026-02-07 16:58:15 +01:00
cryptogopher
d6f9bb6634 Add some TODOs 2022-10-10 15:40:01 +02:00
cryptogopher
1e206b248c Merge branch 'timerisr' 2022-10-09 22:25:05 +02:00
cryptogopher
8594905748 Add temperature hysteresis
Do not refresh display if value not changed
2022-10-09 22:18:59 +02:00
cryptogopher
814a99f733 Remove buzzer state variable 2022-10-09 21:48:16 +02:00
cryptogopher
7fe04d76cb Extract buzzer to separate file 2022-10-09 21:36:40 +02:00
cryptogopher
f8878d3c37 Replace tone() with custom timer 2022-10-09 20:34:25 +02:00
cryptogopher
374a72fb07 Move tube to separate file 2022-10-09 15:29:30 +02:00
cryptogopher
21512bc4f4 Add temperature and break countdown display 2022-10-09 15:09:52 +02:00
cryptogopher
3872ece37b Join ISRs 2022-10-09 14:40:33 +02:00
cryptogopher
315aa9996c Update break time and beep freq 2022-10-09 14:26:33 +02:00
cryptogopher
b81b52b204 Replace delay() with ISR_Timer 2022-09-12 00:07:37 +02:00
cryptogopher
3f5ce648d5 Add BME280 temperature display on timer ISR 2022-09-09 13:07:56 +02:00
cryptogopher
4a46ee65b9 Initial commit 2022-09-08 22:54:21 +02:00