Moved pin layout to config

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-14 17:22:40 +02:00
parent 04b52ca4ef
commit 0577c51cd4
2 changed files with 18 additions and 12 deletions

View File

@ -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};

View File

@ -1,9 +1,7 @@
/**
* Loading classes
*/
#ifndef UNIT_TEST
#include <Arduino.h>
#endif
#include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRrecv.h>
#include <IRsend.h>
@ -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
*/