Added RGB led control class
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user