ESP32 based project

This commit is contained in:
Ollo
2020-09-07 18:18:46 +02:00
parent b6d3f96239
commit c8ebe2a6bc
30 changed files with 41356 additions and 0 deletions

27
esp32/src/PlantCtrl.cpp Normal file
View File

@@ -0,0 +1,27 @@
/**
* @file PlantCtrl.cpp
* @author your name (you@domain.com)
* @brief
* @version 0.1
* @date 2020-05-27
*
* @copyright Copyright (c) 2020
*
*/
#include "PlantCtrl.h"
Plant::Plant(int pinSensor, int pinPump) {
this->mPinSensor = pinSensor;
this->mPinPump = pinPump;
}
void Plant::addSenseValue(int analog) {
this->mAnalogValue += analog;
}
void Plant::calculateSensorValue(int amountMeasurePoints) {
this->mValue = this->mAnalogValue / amountMeasurePoints;
this->mAnalogValue = 0;
}