diff --git a/main/config.h.dist b/main/config.h.dist index 479083e..883ccad 100644 --- a/main/config.h.dist +++ b/main/config.h.dist @@ -1,3 +1,19 @@ +/** + * Configuration file example + */ const char *ssid = ""; const char *password = ""; const char* hostname = "physical-interface"; + +/** + * Pin layout + */ +const uint16_t PIN_RADIO_TRANSMITTER = D7; +const uint16_t PIN_RADIO_RECIEVER = D8; +const uint16_t PIN_PIR = D1; +const uint16_t PIN_DHT = D6; +const uint16_t PIN_IR_RECIEVER = D4; +const uint16_t PIN_IR_SEND = D2; +const uint16_t PIN_LDR = A0; +const uint16_t PIN_ACTIVE_BUZZER = D5; +const uint16_t PINS_SOIL_MOISTURE[] = {D3,D9,D10}; diff --git a/main/main.ino b/main/main.ino index 9087861..383e9e3 100644 --- a/main/main.ino +++ b/main/main.ino @@ -1,9 +1,7 @@ /** * Loading classes */ -#ifndef UNIT_TEST - #include -#endif +#include #include #include #include @@ -20,14 +18,7 @@ /** * Define constants */ -const uint16_t PIN_RADIO_TRANSMITTER = D7; -const uint16_t PIN_RADIO_RECIEVER = D8; -const uint16_t PIN_PIR = D1; -const uint16_t PIN_DHT = D6; -const uint16_t PIN_IR_RECIEVER = D4; -const uint16_t PIN_IR_SEND = D2; -const uint16_t PIN_LDR = A0; -const uint16_t PIN_ACTIVE_BUZZER = D5; +const uint16_t NONE = 65535; // Used to define not activated pins. const char* PARAMETER_PLUG_ADDRESS="plug_address"; const char* PARAMETER_PLUG_ID="plug_id"; @@ -59,7 +50,6 @@ MDNSResponder mdns; ESP8266WebServer server ( 80 ); IRrecv irrecv(PIN_IR_RECIEVER); - /** * Setter functions */