diff --git a/config_DHT.h b/config_DHT.h index 4dda0d4..067f1b5 100644 --- a/config_DHT.h +++ b/config_DHT.h @@ -31,15 +31,9 @@ #define dht_always true // if false when the current value for temp or hum is the same as previous one don't send it by MQTT #define TimeBetweenReadingDHT 30000 // time between 2 DHT readings /*-------------------PIN DEFINITIONS----------------------*/ -#ifdef I2C_Wiring // With Support for I2C Modules - #define DHT_RECEIVER_PIN 14 //on nodeMCU this is D5 GPIO14 -#endif - -#ifdef Classic_Wiring // Without Support for I2C Modules - #define DHT_RECEIVER_PIN 0 //on nodeMCU this is D3 GPIO0 -#endif - -#ifdef RFM69_Wiring // Without Support for I2C Modules and HM10 or 11 - #define DHT_RECEIVER_PIN 0 //on nodeMCU this is D3 GPIO0 +#ifdef ESP8266 + #define DHT_RECEIVER_PIN D1 +#else + #define DHT_RECEIVER_PIN D8 #endif diff --git a/config_IR.h b/config_IR.h index 7495320..864d4d7 100644 --- a/config_IR.h +++ b/config_IR.h @@ -68,19 +68,11 @@ #endif /*-------------------PIN DEFINITIONS----------------------*/ -#define IR_RECEIVER_PIN 2 // put 2 = D4 on nodemcu, 2 = D2 on arduino - -#ifdef I2C_Wiring // With Support for I2C Modules - #define IR_EMITTER_PIN 16 // 16 = D0 on nodemcu #define only usefull for ESP8266 +#ifdef ESP8266 + #define IR_RECEIVER_PIN 2 + #define IR_EMITTER_PIN 16 +#else + #define IR_RECEIVER_PIN D3 + #define IR_EMITTER_PIN D9 #endif -#ifdef RFM69_Wiring // With Support for I2C Modules - #define IR_EMITTER_PIN 16 // 16 = D0 on nodemcu #define only usefull for ESP8266 -#endif - -#ifdef Classic_Wiring // Without Support for I2C Modules - #define IR_EMITTER_PIN 14 // 14 = D5 on nodemcu #define only usefull for ESP8266 -#endif - - - diff --git a/config_RF.h b/config_RF.h index bb9a109..91b27bb 100644 --- a/config_RF.h +++ b/config_RF.h @@ -61,42 +61,14 @@ RF supported protocols #define RF2unitKey "UNIT_" // number of your unit value will be defined if a subject contains RF2unitKey followed by a value of 1 digit /*-------------------PIN DEFINITIONS----------------------*/ -#ifdef I2C_Wiring // With Support for I2C Modules - #define RF_EMITTER_PIN 15 //put 15 = D8 on nodemcu - #ifdef ESP8266 - //RF PIN definition - #define RF_RECEIVER_PIN 0 // 0 = D3 on nodemcu - #else +#ifdef ESP8266 + #define RF_RECEIVER_PIN 3 // RX on nodemcu + #define RF_EMITTER_PIN 15 // D8 on nodemcu +#else //IMPORTANT NOTE: On arduino UNO connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library IRremote/IRremoteInt.h so as to free pin D3 for RF RECEIVER PIN //RF PIN definition - #define RF_RECEIVER_PIN 1 // 1 = D3 on arduino - #endif -#endif - -#ifdef Classic_Wiring // Without Support for I2C Modules - #define RF_EMITTER_PIN 4 //put 4 = D2 on nodemcu, 4 = D4 on arduino - #ifdef ESP8266 - //RF PIN definition - #define RF_RECEIVER_PIN 5 // 5 = D1 on nodemcu - #else - //IMPORTANT NOTE: On arduino UNO connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library IRremote/IRremoteInt.h so as to free pin D3 for RF RECEIVER PIN - //RF PIN definition - #define RF_RECEIVER_PIN 1 // 1 = D3 on arduino - #endif -#endif - -#ifdef RFM69_Wiring // Without Support for I2C Modules and HM10 or 11 - #ifdef ESP8266 - #define RF_RECEIVER_PIN 0 // 0 = D3 on nodemcu - #define RF_EMITTER_PIN 10 //put SD3 on nodemcu - #else - //IMPORTANT NOTE: On arduino UNO connect IR emitter pin to D9 , comment #define IR_USE_TIMER2 and uncomment #define IR_USE_TIMER1 on library IRremote/IRremoteInt.h so as to free pin D3 for RF RECEIVER PIN - //RF PIN definition - #define RF_RECEIVER_PIN 1 // 1 = D3 on arduino + #define RF_RECEIVER_PIN D2 #define RF_EMITTER_PIN 4 //4 = D4 on arduino - #endif #endif - - diff --git a/config_RFM69.h b/config_RFM69.h index 0ff1187..2c17d1b 100644 --- a/config_RFM69.h +++ b/config_RFM69.h @@ -48,21 +48,18 @@ const char PROGMEM RFM69AP_NAME[] = "RFM69-AP"; #define IS_RFM69HCW true // set to 'true' if you are using an RFM69HCW module #define POWER_LEVEL 31 -/*-------------------PIN DEFINITIONS----------------------*/ - -#ifdef RFM69_Wiring // Without Support for I2C Modules and HM10 or 11 - - #ifdef ESP8266 - #define RFM69_CS D1 // GPIO5/HCS/D1 - #define RFM69_IRQ D8 // GPIO15/D8 - #define RFM69_IRQN digitalPinToInterrupt(RFM69_IRQ) - #define RFM69_RST D4 // GPIO02/D4 - #else - //RFM69 not tested with arduino - #define RFM69_CS 10 - #define RFM69_IRQ 2 - #define RFM69_IRQN digitalPinToInterrupt(RFM69_IRQ) - #define RFM69_RST 9 - #endif +/*-------------------PIN DEFINITIONS----------------------*/ +#ifdef ESP8266 + #define RFM69_CS D3 + #define RFM69_IRQ D8 // GPIO15/D8 + #define RFM69_IRQN digitalPinToInterrupt(RFM69_IRQ) + #define RFM69_RST D4 // GPIO02/D4 +#else + //RFM69 not tested with arduino + #define RFM69_CS 10 + #define RFM69_IRQ 2 + #define RFM69_IRQN digitalPinToInterrupt(RFM69_IRQ) + #define RFM69_RST 9 #endif + diff --git a/img/OpenMQTTgateway_ESP8266_Addon_BT.fzz b/img/OpenMQTTgateway_ESP8266_Addon_BT.fzz new file mode 100644 index 0000000..a80e27a Binary files /dev/null and b/img/OpenMQTTgateway_ESP8266_Addon_BT.fzz differ