Modify pins to match the new wiring schema
This commit is contained in:
1 parent
3c5daf49e4
commit
5de2e1f517
5 files changed
+28
-73
No files matched your search
+4
-10
@@ -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
|
||||
|
||||
+6
-14
@@ -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
|
||||
|
||||
|
||||
|
||||
+5
-33
@@ -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 <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 <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 <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
|
||||
|
||||
|
||||
|
||||
|
||||
+13
-16
@@ -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
|
||||
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user