File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
libraries/MySensors/examples/MysensorMicro Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1+ * ~
2+ * bak
Original file line number Diff line number Diff line change 2323#define CHILD_ID_HUM 2
2424#define CHILD_ID_BATT 199
2525
26+ // How many milli seconds between each measurement
27+ #define MEASURE_INTERVAL 60000
28+
29+ // FORCE_TRANSMIT_INTERVAL, this number of times of wakeup, the sensor is forced to report all values to the controller
30+ #define FORCE_TRANSMIT_INTERVAL 30
31+
32+ // When MEASURE_INTERVAL is 60000 and FORCE_TRANSMIT_INTERVAL is 30, we force a transmission every 30 minutes.
33+ // Between the forced transmissions a tranmission will only occur if the measured value differs from the previous measurement
34+
2635// Pin definitions
2736#define TEST_PIN A0
2837#define LED_PIN A2
3140const int sha204Pin = ATSHA204_PIN;
3241atsha204Class sha204 (sha204Pin);
3342
34-
35- #define MEASURE_INTERVAL 60000
36-
37- // FORCE_TRANSMIT_INTERVAL, this number of times of wakeup, the sensor is forced to report all values to the controller
38- #define FORCE_TRANSMIT_INTERVAL 30
39-
4043SI7021 humiditySensor;
4144SPIFlash flash (8 , 0x1F65 );
4245
@@ -97,7 +100,7 @@ void loop() {
97100 bool forceTransmit = false ;
98101
99102 if (measureCount > FORCE_TRANSMIT_INTERVAL
100- ) {// Every 60th time we wake up, force a transmission on all sensors.
103+ ) { // force a transmission
101104 forceTransmit = true ;
102105 measureCount = 0 ;
103106 }
You can’t perform that action at this time.
0 commit comments