Added RGB led control class

This commit is contained in:
2026-07-30 17:39:29 +02:00
parent 9e078490dd
commit b12296bf0e
2 changed files with 122 additions and 1 deletions
+6 -1
View File
@@ -1,6 +1,6 @@
import _thread
from machine import Pin
from shared import get_lora, get_uart, deviceTypes, config
from sensors import RGBLED
import time
# --- Configuration Matérielle ---
@@ -19,6 +19,11 @@ except Exception:
lora = get_lora()
lora.configure(freq=868.1, sf=7)
# --- Création des lEDs RGB ---
magnetron_led = RGBLED(red_pin=48, green_pin=47, blue_pin=33)
magnetron_led.set_color(RGBLED.YELLOW)
magnetron_led.off()
print(f"ESP32 initialisé avec l'ID : '{DEVICE_ID}' (Type : {deviceTypes.DEVICE_TYPES['MICROWAVE']})")
def heartbeat_loop():