From 30b5a0dd9aa07d4610d0e83eb290227c2f441f6e Mon Sep 17 00:00:00 2001 From: scayac Date: Mon, 26 Jan 2026 21:31:54 +0100 Subject: [PATCH] =?UTF-8?q?Logique=20invers=C3=A9e=20pour=20l'identifiant?= =?UTF-8?q?=20de=20la=20carte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index fda2c36..4af78b7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -109,13 +109,13 @@ void setup() { // Lire l'ID du module (GPIO 8=bit0, 9=bit1, 10=bit2) // Logique inverse : LOW=1, HIGH=0 - // LOW LOW LOW (000) = BleQuiz-1 - // LOW LOW HIGH (001) = BleQuiz-2 + // LOW LOW LOW (111) = BleQuiz-8 + // LOW LOW HIGH (110) = BleQuiz-7 // ... - // HIGH HIGH HIGH (111) = BleQuiz-8 + // HIGH HIGH HIGH (000) = BleQuiz-1 uint8_t moduleId = 0; for (int i = 0; i < NUM_ID_PINS; i++) { - if (digitalRead(ID_GPIO_PINS[i]) == HIGH) { + if (digitalRead(ID_GPIO_PINS[i]) == LOW) { moduleId |= (1 << i); } }