fixed arduino timer issue
This commit is contained in:
parent
c1c923a2fc
commit
8526e5157d
2 changed files with 15 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue