-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathConfig.h
68 lines (54 loc) · 3.5 KB
/
Config.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* ====================================================
Version: OpenSprinkler_Arduino 2.1.6
Date: January 2016
Repository: https://github.com/Dave1001/OpenSprinkler-Arduino
License: Creative Commons Attribution-ShareAlike 3.0 license
About: This is a fork of Rays OpenSprinkler code thats amended to use alternative hardware:
- Arduino Mega 2560
- Enc28j60 Ethernet with external SD Card
- Freetronics LCD Keypad Shield
- Discrete IO outputs instead of using a shift register
In general the approach is to make only the absolute minimum changes necessary to:
1) use standard Arduino libraries
2) get alternative hardware to run
Otherwise the code is 'as is' from https://github.com/OpenSprinkler/OpenSprinkler-Firmware
Changes from Rays original code are marked with OPENSPRINKLER_ARDUINO (or variations thereof)
As always - FULL CREDIT to Ray for all his hard work to build and maintain the Open Sprinkler project!
*/
#ifndef _OS_CONFIG_H
#define _OS_CONFIG_H
// =================================================================
// Compiler switches - comment out these defines to substitute different hardware and torun on/off functionality
// You can also search the project for these keywords to find where the code has been modified
#define OPENSPRINKLER_ARDUINO
//#define OPENSPRINKLER_ARDUINO_DISCRETE // use discrete IO instead of a shift register to control sprinkler outputs
//#define OPENSPRINKLER_ARDUINO_FREETRONICS_LCD // use Freetronics LCD with keypad
#if defined(ESP8266) || defined(ESP32)
#define OPENSPRINKLER_ARDUINO_W5100 // use Wiznet5100 Ethernet shield (without this the code defaults to the Ethercard enc28j60 library)
#endif
//#define OPENSPRINKLER_ARDUINO_AUTOREBOOT // this is an additional function to reboot daily to ensure stable operation
//#define OPENSPRINKLER_ARDUINO_FREEMEM // this is an additional function to display free memory on the LCD for debugging
//#define OPENSPRINKLER_ARDUINO_HEARTBEAT // this is an additional function to say 'alls well' - flashes an LED, and the ':' on the LCD time at 1Hz
//#define OPENSPRINKLER_ARDUINO_WDT // this flag turns the WDT on or off (refer to your reference documentation
// for whether the firmware loaded on your Arduino mega supports a WDT)
// =================================================================
// HARDWARE CONFIGURATIONS GPIO channels #define
// RTC DS1307, DS33xx I2C channels
// LCD Standard , GPIO 5 channels
// Freetronic, ? def OPENSPRINKLER_ARDUINO_FREETRONICS_LCD
// I2C I2C ch def LCDI2C
// Station Output Std.Shift registers GPIO 3 channels
// Discreete 8 channels def OPENSPRINKLER_ARDUINO_DISCRETE
// I2C I2C ch def I2C_SHIF_REG
// Buttons Std. 3 Dig.Inputs GPIO 3 Channels
// analog Input 1 anal. chan. def BUTTON_ADC_PIN
// SD Std. SPI MicroSD SPI channels +1 def SD_FAT
// SPIFFS (emulations in Flash mem) I2C channels def SPIFFSDFAT
// EEPROM Std. 2kB on board(Mega) onboard
// I2C on RTC board 4kB I2C channels def MYEEPROM
//ETHERNET std ENC SPI channels
// W5100 SHIELD SPI channels OPENSPRINKLER_ARDUINO_W5100
// ESP8266 onboard none ESP8266
// removed PROGMEM from to call look at
// ESP8266 has WDT_rst function
#endif // _OS_CONFIG_H