diff --git a/NodeManager.cpp b/NodeManager.cpp index 03a891a9e400ec61ac6e1711187552600eb2bd52..5a02a55fbc59f122b516a0c20a2e598ed26fcce7 100755 --- a/NodeManager.cpp +++ b/NodeManager.cpp @@ -2713,7 +2713,7 @@ void SensorTSL2561::onProcess(Request & request) { /* SensorPT100 */ - +#if MODULE_PT100 == 1 // contructor SensorPT100::SensorPT100(NodeManager* node_manager, int child_id, int pin): Sensor(node_manager, child_id, pin) { // set presentation, type and value type @@ -2767,7 +2767,7 @@ void SensorPT100::onProcess(Request & request) { } _send(_msg_service.set(function)); } - +#endif /******************************************* NodeManager diff --git a/NodeManager.h b/NodeManager.h index 58c4c445fc26bc3a5c632f58f4785f84255b75ca..2f7b9db3feab524846bf1ae38794dc85df6101d0 100755 --- a/NodeManager.h +++ b/NodeManager.h @@ -111,7 +111,7 @@ Default module settings */ -// Enable this module to use one of the following sensors: SENSOR_ANALOG_INPUT, SENSOR_LDR, SENSOR_THERMISTOR, SENSOR_ACS712, SENSOR_PT100 +// Enable this module to use one of the following sensors: SENSOR_ANALOG_INPUT, SENSOR_LDR, SENSOR_THERMISTOR, SENSOR_ML8511, SENSOR_ACS712, SENSOR_RAIN_GAUGE, SENSOR_RAIN, SENSOR_SOIL_MOISTURE #ifndef MODULE_ANALOG_INPUT #define MODULE_ANALOG_INPUT 0 #endif @@ -123,18 +123,14 @@ #ifndef MODULE_DIGITAL_OUTPUT #define MODULE_DIGITAL_OUTPUT 0 #endif -// Enable this module to use one of the following sensors: SENSOR_SHT21, SENSOR_HTU21D -#ifndef MODULE_SHT21 - #define MODULE_SHT21 0 -#endif -// Enable this module to use one of the following sensors: SENSOR_AM2320 -#ifndef MODULE_AM2320 - #define MODULE_AM2320 0 -#endif // Enable this module to use one of the following sensors: SENSOR_DHT11, SENSOR_DHT22, SENSOR_DHT21 #ifndef MODULE_DHT #define MODULE_DHT 0 #endif +// Enable this module to use one of the following sensors: SENSOR_SHT21, SENSOR_HTU21D +#ifndef MODULE_SHT21 + #define MODULE_SHT21 0 +#endif // Enable this module to use one of the following sensors: SENSOR_SWITCH, SENSOR_DOOR, SENSOR_MOTION #ifndef MODULE_SWITCH #define MODULE_SWITCH 0 @@ -147,10 +143,6 @@ #ifndef MODULE_BH1750 #define MODULE_BH1750 0 #endif -// Enable this module to use one of the following sensors: SENSOR_TSL2561 -#ifndef MODULE_TSL2561 - #define MODULE_TSL2561 0 -#endif // Enable this module to use one of the following sensors: SENSOR_MLX90614 #ifndef MODULE_MLX90614 #define MODULE_MLX90614 0 @@ -183,6 +175,18 @@ #ifndef MODULE_MHZ19 #define MODULE_MHZ19 0 #endif +// Enable this module to use one of the following sensors: SENSOR_AM2320 +#ifndef MODULE_AM2320 + #define MODULE_AM2320 0 +#endif +// Enable this module to use one of the following sensors: SENSOR_TSL2561 +#ifndef MODULE_TSL2561 + #define MODULE_TSL2561 0 +#endif +// Enable this module to use one of the following sensors: SENSOR_PT100 +#ifndef MODULE_PT100 + #define SENSOR_PT100 0 +#endif /*********************************** Supported Sensors @@ -1276,7 +1280,7 @@ class SensorTSL2561: public Sensor { /* SensorPT100 */ - +#if MODULE_PT100 == 1 class SensorPT100: public Sensor { public: SensorPT100(NodeManager* node_manager, int child_id, int pin); @@ -1292,6 +1296,7 @@ class SensorPT100: public Sensor { DFRobotHighTemperature* _PT100; float _voltageRef = 3.3; }; +#endif /*************************************** NodeManager: manages all the aspects of the node diff --git a/NodeManager.ino b/NodeManager.ino index f2296b5fb1ebede6966957376f5635880b0c0e8b..657bfafac7b2c6f4511c5fd0ff80147eabbdf4b1 100755 --- a/NodeManager.ino +++ b/NodeManager.ino @@ -30,7 +30,7 @@ void before() { Serial.begin(MY_BAUD_RATE); /* - * Register below your device specific config + * Register below your sensors */ diff --git a/config.h b/config.h index f3136dd1f12178cb1843c6f036c2f013bada6118..42d0447e58bcf65638131975803bc0e65d880443 100755 --- a/config.h +++ b/config.h @@ -18,9 +18,8 @@ //#define MY_NODE_ID 100 // NRF24 radio settings -//#define MY_RADIO_NRF24 +#define MY_RADIO_NRF24 //#define MY_RF24_ENABLE_ENCRYPTION - //#define MY_RF24_CHANNEL 76 //#define MY_RF24_PA_LEVEL RF24_PA_HIGH //#define MY_DEBUG_VERBOSE_RF24 @@ -38,6 +37,13 @@ //#define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN //#define MY_RF69_SPI_CS D2 +// RS485 serial transport settings +//#define MY_RS485 +//#define MY_RS485_BAUD_RATE 9600 +//#define MY_RS485_DE_PIN 2 +//#define MY_RS485_MAX_MESSAGE_LENGTH 40 +//#define MY_RS485_HWSERIAL Serial1 + /********************************** * MySensors gateway configuration */