18 lines
333 B
C
18 lines
333 B
C
|
#pragma once
|
||
|
#include "Arduino.h"
|
||
|
|
||
|
class GPIOSensor{
|
||
|
public:
|
||
|
char *sensorName;
|
||
|
char *measureName;
|
||
|
uint8_t gpio;
|
||
|
bool isAnalog;
|
||
|
int8_t powerGpio;
|
||
|
int lastMeasure;
|
||
|
|
||
|
GPIOSensor(char *sensorName, char *measureName, uint8_t gpio, bool isAnalog=false, int8_t powerGpio = -1);
|
||
|
int getMeasure(int &level);
|
||
|
int getLastMeasure();
|
||
|
|
||
|
};
|