Skip to content

Commit c0dee15

Browse files
committed
Merge pull request arduino#98 from tbowmo/master
Corrected fuses
2 parents ec37c4d + 0c057e8 commit c0dee15

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*~
2+
*bak

hardware/MySensors/avr/boards.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ MysensorsMicro.upload.speed=57600
1010
MysensorsMicro.bootloader.tool=arduino:avrdude
1111
MysensorsMicro.bootloader.unlock_bits=0x3F
1212
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
1616
MysensorsMicro.bootloader.file=DualOptiboot/optiboot_atmega328p-pro8.hex
1717

1818
MysensorsMicro.build.board=AVR_MICRO8

libraries/MySensors/examples/MysensorMicro/MysensorMicro.ino

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@
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
@@ -31,12 +40,6 @@
3140
const int sha204Pin = ATSHA204_PIN;
3241
atsha204Class 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-
4043
SI7021 humiditySensor;
4144
SPIFlash 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
}

0 commit comments

Comments
 (0)