File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed
libraries/MySensors/examples/MysensorMicro Expand file tree Collapse file tree 3 files changed +15
-10
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 @@ -10,9 +10,9 @@ MysensorsMicro.upload.speed=57600
10
10
MysensorsMicro.bootloader.tool=arduino:avrdude
11
11
MysensorsMicro.bootloader.unlock_bits=0x3F
12
12
MysensorsMicro.bootloader.lock_bits=0x0F
13
- MysensorsMicro.bootloader.low_fuses=0xFF
14
- MysensorsMicro.bootloader.high_fuses=0xDA
15
- MysensorsMicro.bootloader.extended_fuses=0x05
13
+ MysensorsMicro.bootloader.low_fuses=0xE2
14
+ MysensorsMicro.bootloader.high_fuses=0xD2
15
+ MysensorsMicro.bootloader.extended_fuses=0xFE
16
16
MysensorsMicro.bootloader.file=DualOptiboot/optiboot_atmega328p-pro8.hex
17
17
18
18
MysensorsMicro.build.board=AVR_MICRO8
Original file line number Diff line number Diff line change 23
23
#define CHILD_ID_HUM 2
24
24
#define CHILD_ID_BATT 199
25
25
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
+
26
35
// Pin definitions
27
36
#define TEST_PIN A0
28
37
#define LED_PIN A2
31
40
const int sha204Pin = ATSHA204_PIN;
32
41
atsha204Class sha204 (sha204Pin);
33
42
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
-
40
43
SI7021 humiditySensor;
41
44
SPIFlash flash (8 , 0x1F65 );
42
45
@@ -97,7 +100,7 @@ void loop() {
97
100
bool forceTransmit = false ;
98
101
99
102
if (measureCount > FORCE_TRANSMIT_INTERVAL
100
- ) {// Every 60th time we wake up, force a transmission on all sensors.
103
+ ) { // force a transmission
101
104
forceTransmit = true ;
102
105
measureCount = 0 ;
103
106
}
You can’t perform that action at this time.
0 commit comments