New Structure
This commit is contained in:
25
RaspberryPi/dht22.h
Normal file
25
RaspberryPi/dht22.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef dht22_H
|
||||
#define dht22_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int pin;
|
||||
float humidity;
|
||||
float temperature;
|
||||
} sensor;
|
||||
|
||||
void getData(sensor *s);
|
||||
//static int read_dht22_dat(int pin, sensor *s);
|
||||
//static uint8_t sizecvt(const int read);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user