forked from Arduino/metronom
0332b728e60de52b035555cdc4d4a99e736d1db8
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>
Arduino based device acting as:
- metronome, for exercises that require timing,
- countdown timer, for rest between exercises,
- thermometer / hygrometer - when not uses for exercises.
Part list:
- Arduino MKR 1010 (ABX00023)
- Arduino MKR Connector Carrier, Grove compatible (ASX00007)
- BME280 sensor (Seeed Studio SEE-11355)
- quad, alphanumeric (14-segment), HT16K33 based display (SeedStudio SEE-14733)
- push button with backlight (Seeed Studio SEE-13660)
- passive buzzer (Seeed Studio SEE-17268)
- I2C 6 port hub (Seeed Studio SEE-15856)
- cables - as required All modules based on Grove connections and cables.
All modules are connected to Arduino through Connector Carrier:
- buzzer - port D0,
- button - port D5,
- I2C hub - port TWI,
- sensor and display - to hub (any port)
Description
Languages
C++
100%