guild icon
Toit
#Dhtxx exception error
Thread channel in help
~~boss~~
~~boss~~ 09/08/2025 04:05 AM
Deadline exceeded
~~boss~~
~~boss~~ 09/08/2025 04:06 AM
Code:
~~boss~~
~~boss~~ 09/08/2025 04:08 AM
// Copyright (C) 2022 Toitware ApS. // Use of this source code is governed by a Zero-Clause BSD license that can // be found in the EXAMPLES_LICENSE file. import dhtxx import gpio GPIO-PIN-NUM ::= 32 main: pin := gpio.Pin GPIO-PIN-NUM driver := dhtxx.Dht22 pin // On some versions of Toit/ESP-IDF it is necessary to sleep a bit before // reading the sensor for the first time. sleep --ms=300 (Duration --s=1).periodic: print driver.read
~~boss~~
~~boss~~ 09/08/2025 04:09 AM