I get a timing error on every 4th bit

No idea why
This commit is contained in:
2023-10-30 21:38:35 +00:00
parent 6b40f97ba5
commit 089d8a62f1
2 changed files with 56 additions and 33 deletions

View File

@@ -70,12 +70,12 @@ void read_from_dht22() {
portDISABLE_INTERRUPTS();
int ret = dht22_read();
portENABLE_INTERRUPTS();
ESP_LOGE(TAG, "dht_ret: %i", ret);
if (ret != DHT22_OK) {
dht22_handle_error(ret);
} else {
latest_datapoint.temp = dht22_temperature();
latest_datapoint.rh = dht22_relative_humidity();
ESP_LOGW(TAG, "%f & %f", latest_datapoint.temp / 10.0, latest_datapoint.rh / 10.0 );
if (has_ntp_time_obtained_once()) {
// I _think_ I only want to be doing that rolling average and saving