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
1010MysensorsMicro.bootloader.tool=arduino:avrdude
1111MysensorsMicro.bootloader.unlock_bits=0x3F
1212MysensorsMicro.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
1616MysensorsMicro.bootloader.file=DualOptiboot/optiboot_atmega328p-pro8.hex
1717
1818MysensorsMicro.build.board=AVR_MICRO8
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