Add waterPlant stub and update pump usage
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
#include "moisture.h"
|
||||
#include "pump.h"
|
||||
|
||||
|
||||
|
||||
ISR(WDT_vect) {
|
||||
triggerRead();
|
||||
}
|
||||
@@ -43,7 +41,7 @@ int main(void) {
|
||||
int16_t result = moistureRead();
|
||||
//espSend(VASE_NUM, result)
|
||||
}
|
||||
// if(espGet("ask if i need to water plants") == true) {trigger()}
|
||||
// if(espGet("ask if i need to water plants") == true) {waterPlant()}
|
||||
enterSleep();
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include "config.h"
|
||||
|
||||
void pumpsInit(void) {
|
||||
// Set as input
|
||||
@@ -22,3 +23,8 @@ void triggerPump(int8_t pump_pin, int16_t milliseconds) {
|
||||
// Turn off pump
|
||||
PORTD &= ~(1 << pump_pin);
|
||||
}
|
||||
|
||||
void waterPlant(void) {
|
||||
//for each pump --> turn em on
|
||||
//better to have it here as function instead of doing it in main
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user