-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement power control over radio transmission
Other changes: * Decouple settings * Add test env * Static network config
- Loading branch information
Showing
13 changed files
with
229 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/** | ||
* | ||
* Settings.h | ||
* | ||
**/ | ||
|
||
/* | ||
* !! WARNING !! | ||
* | ||
* !!! DO NOT USE pins 5(D1),4(D2) | ||
* because they are reserved | ||
* for I2C bus SCL,SDA !!! | ||
* | ||
* !! WARNING !! | ||
*/ | ||
|
||
#ifndef SETTINGS_H | ||
#define SETTINGS_H | ||
|
||
#include <Arduino.h> | ||
|
||
#ifndef CUSTOM_NETWORK | ||
#define IP_ADDRESS "192.168.1.30" | ||
#define SUBNET "255.255.255.0" | ||
#define GATEWAY "192.168.1.1" | ||
#define DNS1 "192.168.1.4" | ||
#define DNS2 "192.168.1.1" | ||
#define HOSTNAME "arduino-grower" | ||
#else | ||
#define IP_ADDRESS "192.168.1.31" | ||
#define SUBNET "255.255.255.0" | ||
#define GATEWAY "192.168.1.1" | ||
#define DNS1 "192.168.1.4" | ||
#define DNS2 "192.168.1.1" | ||
#define HOSTNAME "test-arduino-grower" | ||
#endif | ||
|
||
#define WEB_SERVER_PORT 80 | ||
#define RADIO_POWER // Enable power control over radio transmission | ||
|
||
#ifdef RADIO_POWER | ||
#define TX_PIN 2 | ||
#define RCSWITCH_PROTOCOL 13 | ||
/* | ||
* ORNO OR-AE-13132(GS) power extender codes | ||
*/ | ||
#define MSG_LENGTH 24 | ||
|
||
#define OUTLET1_ON 0x15533 | ||
#define OUTLET1_OFF 0x1553C | ||
#define OUTLET2_ON 0x155C3 | ||
#define OUTLET2_OFF 0x155CC | ||
#define OUTLET3_ON 0x15703 | ||
#define OUTLET3_OFF 0x1570C | ||
#define OUTLET4_ON 0x15D03 | ||
#define OUTLET4_OFF 0x15D0C | ||
#define OUTLET5_ON 0x17503 | ||
#define OUTLET5_OFF 0x1750C | ||
|
||
#define LAMP_ON_CODE OUTLET1_ON | ||
#define LAMP_OFF_CODE OUTLET1_OFF | ||
#define HUM_ON_CODE OUTLET2_ON | ||
#define HUM_OFF_CODE OUTLET2_OFF | ||
#define FAN_ON_CODE OUTLET3_ON | ||
#define FAN_OFF_CODE OUTLET3_OFF | ||
#else | ||
#define LAMPRELAYPIN 0 // white/light-brown | ||
#define HUMRELAYPIN 2 // violet | ||
#define FANRELAYPIN 16 // white | ||
#endif | ||
|
||
#define PUMPPIN 14 // blue | ||
#define LDRPIN A0 // dark-brown/blue | ||
|
||
// TODO: replace const's with define's | ||
/* monitoring constants */ | ||
const uint8_t MAX_TEMP = 40; | ||
const uint8_t TEMP_HYSTERESIS = 10; | ||
// Recommended RH values: | ||
// - vegetative - 60% | ||
// - flowering - 50% | ||
const uint8_t MAX_RH = 50; | ||
const uint8_t RH_HYSTERESIS = 15; | ||
// lamp check interval in seconds | ||
const uint8_t LIGHT_CHECK_INTERVAL = 10; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,6 @@ | |
#ifndef VERSION_H | ||
#define VERSION_H | ||
|
||
#define VERSION "0.10.0" | ||
#define VERSION "0.11.0" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.