diff --git a/arduino/HalMultiSensor/HalConfiguration.h b/arduino/HalMultiSensor/HalConfiguration.h index aaeec5ce..afab67fa 100755 --- a/arduino/HalMultiSensor/HalConfiguration.h +++ b/arduino/HalMultiSensor/HalConfiguration.h @@ -6,24 +6,25 @@ #define TIMER_MILLISECOND 60000 // poling in minutes #define INDICATOR_PIN 13 // diode -#define DEVICE_BASE_ID 98 +#define TX_PIN 11 +#define DEVICE_BASE_ID 99 // POWER CONSUMPTION SENSOR //#define POWERCON_ENABLED // comment out to disable sensor #define POWERCON_SENSOR SensorPhotocell() -#define POWERCON_PROTOCOL ProtocolOregon(11, DEVICE_BASE_ID + 1) +#define POWERCON_PROTOCOL ProtocolOregon(TX_PIN, DEVICE_BASE_ID + 0) #define POWER_TIMER_MULTIPLIER 1 // TEMPERATURE SENSOR #define TEMPERATURE_ENABLED // comment out to disable sensor -#define TEMPERATURE_SENSOR SensorDHT(DHT22, 10) -#define TEMPERATURE_PROTOCOL ProtocolOregon(11, DEVICE_BASE_ID + 2) +#define TEMPERATURE_SENSOR SensorDHT(DHT11, 10) +#define TEMPERATURE_PROTOCOL ProtocolOregon(TX_PIN, DEVICE_BASE_ID + 1) #define TEMPERATURE_TIMER_MULTIPLIER 10 // LIGHT SENSOR //#define LIGHT_ENABLED // comment out to disable sensor #define LIGHT_SENSOR SensorBH1750() -#define LIGHT_PROTOCOL ProtocolOregon(11, DEVICE_BASE_ID + 3) +#define LIGHT_PROTOCOL ProtocolOregon(TX_PIN, DEVICE_BASE_ID + 2) #define LIGHT_TIMER_MULTIPLIER 10 diff --git a/arduino/HalMultiSensor/HalMultiSensor.ino b/arduino/HalMultiSensor/HalMultiSensor.ino index c7bc6714..1748cc75 100755 --- a/arduino/HalMultiSensor/HalMultiSensor.ino +++ b/arduino/HalMultiSensor/HalMultiSensor.ino @@ -10,6 +10,15 @@ the data to a central location. #include "Interrupt.h" +#ifndef POWERCON_ENABLED + #define POWER_TIMER_MULTIPLIER 1 +#endif +#ifndef TEMPERATURE_ENABLED + #define TEMPERATURE_TIMER_MULTIPLIER 1 +#endif +#ifndef LIGHT_ENABLED + #define LIGHT_TIMER_MULTIPLIER 1 +#endif #define TIMER_MULTIPLIER_MAX \ POWER_TIMER_MULTIPLIER * TEMPERATURE_TIMER_MULTIPLIER * LIGHT_TIMER_MULTIPLIER unsigned int timerMultiplier = 0;