-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwaterbot.h
37 lines (29 loc) · 813 Bytes
/
waterbot.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#define PIN_PUMP 2
#define PIN_PCF8574_LED 0
#define PIN_PCF8574_SENSOR 1
#define PIN_PCF8574_VALVE 2
#define PIN_PCF8574_ERROR_LED 3
#define PROFILE_DEV 1
#define PROFILE_PRODUCTION 2
#define PROFILE PROFILE_PRODUCTION
#define DRY_TIMER_HOURS 12
#define VALVE_DELAY_MILLIS 500
#define MAX_WATERLESS_DAYS 5
#define PUMP_TURN_OFF_DELAY_MILLIS 500
#define LOG_FILE "waterbot-%d.log"
#define LOGGER_SD 1
#define LOGGER_SERIAL 2
#if PROFILE == PROFILE_DEV
#define LOGGER LOGGER_SERIAL
#define COOL_DOWN_SECONDS 3
#define WATER_SECONDS 1
#define BOOT_WATER_SECONDS 1
#define PAUSE_SECONDS 1
#elif PROFILE == PROFILE_PRODUCTION
#define LOGGER LOGGER_SD
#define COOL_DOWN_SECONDS 21600 // 6h
#define WATER_SECONDS 10
#define BOOT_WATER_SECONDS 5
#define PAUSE_SECONDS 1200
#endif