Started some DHT22 stuff

Haven't tested it at all
This commit is contained in:
2023-10-23 22:34:21 +01:00
parent c91a8fc729
commit 6b9ec20b72
3 changed files with 42 additions and 8 deletions

View File

@@ -1,10 +1,18 @@
#pragma once
#include <stdint.h>
typedef enum {
DHT_OK
DHT22_OK,
DHT22_TIMING_ERROR,
DHT22_CHECKSUM_ERROR,
} dht22_error;
int dht_temperature();
dht22_error dht_read();
typedef uint16_t deci_percent;
typedef int16_t deci_degrees_c;
deci_percent dht22_relative_humidity();
deci_degrees_c dht22_temperature();
dht22_error dht22_read();