new wiring modifications

This commit is contained in:
1technophile committed 2017-09-17 21:32:13 +02:00
1 parent 2c9e584ff2
commit 3c5daf49e4
2 files changed
+13 -25

No files matched your search

+1 -1
View File
@@ -120,7 +120,7 @@ void callback(char* topic, byte* payload, unsigned int length) {
void setup()
{
//Launch serial for debugging purposes
Serial.begin(SERIAL_BAUD);
Serial.begin(SERIAL_BAUD, SERIAL_8N1, SERIAL_TX_ONLY);
#ifdef ESP8266
//Begining wifi connection in case of ESP8266
+12 -24
View File
@@ -31,12 +31,6 @@
/*----------------------------USER PARAMETERS-----------------------------*/
#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----------------*/
//MQTT Parameters definition
#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----------------*/
//Addons and module management, comment the Z line and the config file if you don't use
#ifdef ESP8266 // for nodemcu, weemos and esp8266
#define ZsensorDHT
#include "config_DHT.h"
#define ZgatewayRF
#include "config_RF.h"
#define ZgatewayRF2
#ifdef RFM69_Wiring
#define ZgatewayRFM69
#include "config_RFM69.h"
#endif
#define ZgatewayIR
#include "config_IR.h"
#define ZgatewayBT
#include "config_BT.h"
#ifdef I2C_Wiring // to use the sensor below the gateway should wired with I2CWiring, see PIN DEFINITIONS below
#define ZsensorBH1750
#include "config_BH1750.h"
#define ZsensorBME280
#include "config_BME280.h"
#endif
#define ZsensorBH1750
#include "config_BH1750.h"
#define ZsensorBME280
#include "config_BME280.h"
//#define ZsensorDHT
//#include "config_DHT.h"
//#define ZgatewayRFM69
//#include "config_RFM69.h"
#else // for arduino + W5100
#define ZgatewayRF
#include "config_RF.h"
#define ZgatewayRF2
#ifdef RFM69_Wiring
//#define ZgatewayRFM69 not tested
//#include "config_RFM69.h"
#endif
#define ZgatewayIR
#include "config_IR.h"
#define ZgatewayBT
@@ -110,8 +96,10 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
//#include "config_BH1750.h"
//#define ZsensorBME280
//#include "config_BME280.h"
#endif/*----------------------------OTHER PARAMETERS-----------------------------*/
//#define ZgatewayRFM69 not tested
//#include "config_RFM69.h"
#endif
/*----------------------------OTHER PARAMETERS-----------------------------*/
/*-------------------CHANGING THEM IS NOT COMPULSORY-----------------------*/
/*--------------MQTT general topics-----------------*/
// global MQTT subject listened by the gateway to execute commands (send RF, IR or others)