Ver planes
Modelo 3D de placa de circuito integrado: from machine import Pin, I2C
import dht
import time
import ssd1306

# ---------- | Tripo AI
Lv.0

embedded circuit board 3d model

Explorar todos los modelos 3D
Prompt

from machine import Pin, I2C import dht import time import ssd1306 # ---------------- CONFIGURACIÓN DE PINES ---------------- DHT_PIN = 4 RELAY_PIN = 25 SDA_PIN = 21 SCL_PIN = 22 # Límite de temperatura COOLING_ON_TEMP = 40.0 # ---------------- DHT22 ---------------- sensor = dht.DHT22(Pin(DHT_PIN)) # ---------------- RELÉ ---------------- relay = Pin(RELAY_PIN, Pin.OUT) relay.value(0) # Compresor APAGADO inicialmente # ---------------- OLED ---------------- i2c = I2C( 0, scl=Pin(SCL_PIN), sda=Pin(SDA_PIN), freq=400000 ) oled = ssd1306.SSD1306_I2C(128, 64, i2c) # ---------------- PANTALLA DE INICIO ---------------- oled.fill(0) oled.text("SHITAL", 35, 5) oled.text("Sistema de refrigeración", 10, 25) oled.text("Iniciando...", 25, 45) oled.show() time.sleep(2) # ---------------- BUCLE PRINCIPAL ---------------- while True: try: # Leer DHT22 sensor.measure() temperature = sensor.temperature() humidity = sensor.humidity() print("------------------")

4K·PBR·Tripo H3.1

Modelos relacionados