From e76c3a100cc4e887d1f9e638005072e26ba8b039 Mon Sep 17 00:00:00 2001 From: Laurent Date: Sun, 4 Jan 2026 21:16:20 +0100 Subject: [PATCH] Oops --- rpi/hardware/sound/sound.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpi/hardware/sound/sound.py b/rpi/hardware/sound/sound.py index e377d46f..a376110f 100644 --- a/rpi/hardware/sound/sound.py +++ b/rpi/hardware/sound/sound.py @@ -40,14 +40,15 @@ class SoundReader: def _read(self): measure_iteration = 100 + level = 0 i = 0 while self._running: - level = 0 if GPIO.input(self._pin): level += 1 if i == measure_iteration: self._notify(f'{{"soundSensorValue": {level}}}') i = 0 + level = 0 i += 1 time.sleep(0.02)