Rename function
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
//#define MOISTURE_SENSOR_A7 PC7
|
||||
|
||||
// You may just connect the pumps that actually are needed in the vase
|
||||
// or define exactly the connected pumps on your system
|
||||
// or define only the connected pumps on your system
|
||||
#define PUMP_D3 PD3
|
||||
#define PUMP_D4 PD4
|
||||
#define PUMP_D5 PD5
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
void sensorsInit(void);
|
||||
void triggerRead(void);
|
||||
void triggerMoistureRead(void);
|
||||
int16_t moistureAverage(int8_t sensorPin);
|
||||
int16_t moistureRead(void);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "pump.h"
|
||||
|
||||
ISR(WDT_vect) {
|
||||
triggerRead();
|
||||
triggerMoistureRead();
|
||||
}
|
||||
|
||||
void watchdogs(void) {
|
||||
@@ -29,7 +29,7 @@ void enterSleep(void) {
|
||||
void setup(void) {
|
||||
adcInit();
|
||||
sensorsInit();
|
||||
//pumpsInit();
|
||||
pumpsInit();
|
||||
watchdogs();
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ int main(void) {
|
||||
int16_t result = moistureRead();
|
||||
//espSend(VASE_NUM, result)
|
||||
}
|
||||
triggerPump(PUMP_D7, 50);
|
||||
// if(espGet("ask if i need to water plants") == true) {waterPlant()}
|
||||
enterSleep();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ void sensorsInit(void) {
|
||||
//(1 << MOISTURE_SENSOR_A7));
|
||||
}
|
||||
|
||||
void triggerRead(void) {
|
||||
void triggerMoistureRead(void) {
|
||||
readSensors = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user