diff --git a/README.md b/README.md index 0723454..9e92e98 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,4 @@ is ~57 uA, which is still quite a lot (> 10 uA should be possible), but already better than 8 mA :-) -![IMG_20250204_202605](https://github.com/user-attachments/assets/9ab786fc-655d-48e0-afa9-cc52b606b4b8) +![IMG_20250212_190518](https://github.com/user-attachments/assets/dd87b7de-c97d-4ecb-ab24-f5a34b849914) diff --git a/avrrfm.c b/avrrfm.c index e87c0b9..09862ad 100644 --- a/avrrfm.c +++ b/avrrfm.c @@ -29,7 +29,7 @@ #include "rfm69.h" #include "mcp9808.h" -#define MEASURE_INTS 1 +#define MEASURE_INTS 4 /* 1 int = 8 seconds */ static volatile uint8_t ints = 0; diff --git a/mcp9808.c b/mcp9808.c index fa6ed02..756d97a 100644 --- a/mcp9808.c +++ b/mcp9808.c @@ -87,10 +87,9 @@ // T < TA LOWER } - int16_t temp; - // clear flag bits upper &= 0x1F; + int16_t temp; if ((upper & 0x10) == 0x10) { // TA < 0°C // clear sign diff --git a/rfm69.c b/rfm69.c index 58ec333..8e11934 100644 --- a/rfm69.c +++ b/rfm69.c @@ -97,7 +97,9 @@ regWrite(OSC1, 0x80); do { } while (!(regRead(OSC1) & 0x40)); - // PA level 17 dBm (default 13 dBm) + // PA level (default +13 dBm) + regWrite(PA_LEVEL, 0x9f); + // +17 dBm - doesn't seem to work? // regWrite(PA_LEVEL, 0x7f); // LNA 200 Ohm, gain AGC (default)