Plan ansehen
3D-Modell einer eingebetteten Leiterplatte: from machine import Pin, I2C
import dht
import time
import ssd1306

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

embedded circuit board 3d model

Alle 3D Modelle anzeigen
Prompt

from machine import Pin, I2C import dht import time import ssd1306 # ---------------- PIN-KONFIGURATION ---------------- DHT_PIN = 4 RELAY_PIN = 25 SDA_PIN = 21 SCL_PIN = 22 # Temperaturgrenze COOLING_ON_TEMP = 40.0 # ---------------- DHT22 ---------------- sensor = dht.DHT22(Pin(DHT_PIN)) # ---------------- RELAY ---------------- relay = Pin(RELAY_PIN, Pin.OUT) relay.value(0) # Kompressor anfänglich AUS # ---------------- OLED ---------------- i2c = I2C( 0, scl=Pin(SCL_PIN), sda=Pin(SDA_PIN), freq=400000 ) oled = ssd1306.SSD1306_I2C(128, 64, i2c) # ---------------- STARTBILDSCHIRM ---------------- oled.fill(0) oled.text("SHITAL", 35, 5) oled.text("Kühlsystem", 10, 25) oled.text("Startet...", 25, 45) oled.show() time.sleep(2) # ---------------- HAUPTSCHLEIFE ---------------- while True: try: # DHT22 lesen sensor.measure() temperature = sensor.temperature() humidity = sensor.humidity() print("------------------

4K·PBR·Tripo H3.1

Ähnliche Modelle