You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
622 B
32 lines
622 B
#pragma once
|
|
#include "Arduino.h"
|
|
#include "DHT.h"
|
|
#include "math.h"
|
|
|
|
///////////////////////////////////////////////////////
|
|
// Pins Definitions
|
|
///////////////////////////////////////////////////////
|
|
|
|
#define HUM_SENS 33
|
|
#define TEMP_SENS 32
|
|
#define PHOTO_SENS 25
|
|
#define VIBRO_SENS 26
|
|
class Sensor{
|
|
|
|
private:
|
|
//KY-015
|
|
DHT *dht;
|
|
|
|
public:
|
|
float temperatureSensor();
|
|
float humiditySensor();
|
|
int photoSensor();
|
|
int vibroSensor();
|
|
|
|
Sensor()
|
|
{
|
|
dht = new DHT(HUM_SENS, DHT11);
|
|
dht->begin();
|
|
}
|
|
};
|