new wiring modifications
This commit is contained in:
1 parent
2c9e584ff2
commit
3c5daf49e4
2 files changed
+9
-21
No files matched your search
+1
-1
@@ -120,7 +120,7 @@ void callback(char* topic, byte* payload, unsigned int length) {
|
|||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
//Launch serial for debugging purposes
|
//Launch serial for debugging purposes
|
||||||
Serial.begin(SERIAL_BAUD);
|
Serial.begin(SERIAL_BAUD, SERIAL_8N1, SERIAL_TX_ONLY);
|
||||||
|
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
//Begining wifi connection in case of ESP8266
|
//Begining wifi connection in case of ESP8266
|
||||||
|
|||||||
+8
-20
@@ -31,12 +31,6 @@
|
|||||||
|
|
||||||
/*----------------------------USER PARAMETERS-----------------------------*/
|
/*----------------------------USER PARAMETERS-----------------------------*/
|
||||||
#define SERIAL_BAUD 115200
|
#define SERIAL_BAUD 115200
|
||||||
/*-------------DEFINE YOUR WIRING TYPE BELOW----------------*/
|
|
||||||
// Choose between "I2C_Wiring" OR "Classic_Wiring" OR "RFM69_Wiring"
|
|
||||||
// Please Note: I2C Wiring,Classic Wiring and RFM69_Wiring uses different Pins for all Modules, see PIN definitions into the wiki
|
|
||||||
//#define I2C_Wiring // With Support for I2C Modules and the associated libraries BH1750 and BME280
|
|
||||||
//#define RFM69_Wiring // following file img/OpenMQTTGateway_IR_RF_RFM69.png
|
|
||||||
#define Classic_Wiring // following file img/OpenMQTTGateway_IR_RF_BT.png
|
|
||||||
/*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/
|
/*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/
|
||||||
//MQTT Parameters definition
|
//MQTT Parameters definition
|
||||||
#define mqtt_server "192.168.1.17"
|
#define mqtt_server "192.168.1.17"
|
||||||
@@ -73,33 +67,25 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
|
|||||||
/*-------------DEFINE THE MODULES YOU WANT BELOW----------------*/
|
/*-------------DEFINE THE MODULES YOU WANT BELOW----------------*/
|
||||||
//Addons and module management, comment the Z line and the config file if you don't use
|
//Addons and module management, comment the Z line and the config file if you don't use
|
||||||
#ifdef ESP8266 // for nodemcu, weemos and esp8266
|
#ifdef ESP8266 // for nodemcu, weemos and esp8266
|
||||||
#define ZsensorDHT
|
|
||||||
#include "config_DHT.h"
|
|
||||||
#define ZgatewayRF
|
#define ZgatewayRF
|
||||||
#include "config_RF.h"
|
#include "config_RF.h"
|
||||||
#define ZgatewayRF2
|
#define ZgatewayRF2
|
||||||
#ifdef RFM69_Wiring
|
|
||||||
#define ZgatewayRFM69
|
|
||||||
#include "config_RFM69.h"
|
|
||||||
#endif
|
|
||||||
#define ZgatewayIR
|
#define ZgatewayIR
|
||||||
#include "config_IR.h"
|
#include "config_IR.h"
|
||||||
#define ZgatewayBT
|
#define ZgatewayBT
|
||||||
#include "config_BT.h"
|
#include "config_BT.h"
|
||||||
#ifdef I2C_Wiring // to use the sensor below the gateway should wired with I2CWiring, see PIN DEFINITIONS below
|
|
||||||
#define ZsensorBH1750
|
#define ZsensorBH1750
|
||||||
#include "config_BH1750.h"
|
#include "config_BH1750.h"
|
||||||
#define ZsensorBME280
|
#define ZsensorBME280
|
||||||
#include "config_BME280.h"
|
#include "config_BME280.h"
|
||||||
#endif
|
//#define ZsensorDHT
|
||||||
|
//#include "config_DHT.h"
|
||||||
|
//#define ZgatewayRFM69
|
||||||
|
//#include "config_RFM69.h"
|
||||||
#else // for arduino + W5100
|
#else // for arduino + W5100
|
||||||
#define ZgatewayRF
|
#define ZgatewayRF
|
||||||
#include "config_RF.h"
|
#include "config_RF.h"
|
||||||
#define ZgatewayRF2
|
#define ZgatewayRF2
|
||||||
#ifdef RFM69_Wiring
|
|
||||||
//#define ZgatewayRFM69 not tested
|
|
||||||
//#include "config_RFM69.h"
|
|
||||||
#endif
|
|
||||||
#define ZgatewayIR
|
#define ZgatewayIR
|
||||||
#include "config_IR.h"
|
#include "config_IR.h"
|
||||||
#define ZgatewayBT
|
#define ZgatewayBT
|
||||||
@@ -110,8 +96,10 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
|
|||||||
//#include "config_BH1750.h"
|
//#include "config_BH1750.h"
|
||||||
//#define ZsensorBME280
|
//#define ZsensorBME280
|
||||||
//#include "config_BME280.h"
|
//#include "config_BME280.h"
|
||||||
|
//#define ZgatewayRFM69 not tested
|
||||||
#endif/*----------------------------OTHER PARAMETERS-----------------------------*/
|
//#include "config_RFM69.h"
|
||||||
|
#endif
|
||||||
|
/*----------------------------OTHER PARAMETERS-----------------------------*/
|
||||||
/*-------------------CHANGING THEM IS NOT COMPULSORY-----------------------*/
|
/*-------------------CHANGING THEM IS NOT COMPULSORY-----------------------*/
|
||||||
/*--------------MQTT general topics-----------------*/
|
/*--------------MQTT general topics-----------------*/
|
||||||
// global MQTT subject listened by the gateway to execute commands (send RF, IR or others)
|
// global MQTT subject listened by the gateway to execute commands (send RF, IR or others)
|
||||||
|
|||||||
Reference in new issue
Block a user