tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
594 stars 185 forks source link

DHT22 measure wrong values #358

Closed fiurthorn closed 1 year ago

fiurthorn commented 2 years ago

using DHT22 from https://www.amazon.de/gp/product/B08NP8NR1J/ref=ppx_yo_dt_b_asin_title_o01_s03?ie=UTF8&psc=1. gives wrong values:

humidity := dht.NewWithPolicy(machine.GP15, dht.DHT22, dht.UpdatePolicy{})
t2, h, _ := humidity.Measurements()
temp2 = fmt.Sprintf("%d", t2/10)
hu = fmt.Sprintf("%d", h/10)
tinyfont.WriteLine(&display, &freeserif.Regular9pt7b, 40, 15, hu+" %", white)
tinyfont.WriteLine(&display, &freeserif.Regular9pt7b, 40, 30, temp2+"  C", white)
conejoninja commented 1 year ago

Could we close this issue? seems to be fixed by #390