Fix display freeze: move I2C work out of interrupt context #8

Open
claude-fable wants to merge 2 commits from claude-fable/metronom:fix/i2c-delay-in-isr-freeze into master
Showing only changes of commit 6abd900a8f - Show all commits

View File

@@ -6,7 +6,11 @@ char tubeText[5] = "";
void initTube() { void initTube() {
// Wire initialized by BME280 sensor // Wire initialized by BME280 sensor
tube.setTubeType(TYPE_4, TYPE_4_DEFAULT_I2C_ADDR); tube.setTubeType(TYPE_4, TYPE_4_DEFAULT_I2C_ADDR);
tube.setBrightness(15); // Brightness drives LED current. The freeze correlates with '8' on the last
// multiplexed digit (most segments lit -> peak current) at full brightness 15,
// which points at a supply/I2C-bus glitch. Lowered to probe that hypothesis;
// raise back toward 15 if the display is too dim and freezes don't return.
tube.setBrightness(4);
tube.setBlinkRate(BLINK_OFF); tube.setBlinkRate(BLINK_OFF);
} }