Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

changes are needed in defines.h

LoRa radio band

Ideally, you should only need to tell the program the legal band you are transmitting on for your locationThis configures the radio to TX/RX on the desired legal frequency for your locale.

Code Block
//===========================================
//LoRa band
//===========================================
#define BAND 915E6  //you can set band here directly,e.g. 868E6,915E6

Wake Frequency

Code Block
languagecpp
//===========================================
//Set how often to wake and read sensors
//===========================================
const int UpdateIntervalSeconds = 30;  //Sleep timer (30s) for my normal operation
#define SEND_FREQUENCY_LORA 5

UpdateIntervalSeconds is set to define how often the station wakes. In the example above, we wake every 30s, and transmit every 5 wake operations. We also alternate the hardware and sensors data sends on the LoRa send.

Why wake, but not send. This lets us get improved resolution on the wind speed and gusting.

WAKE CYCLE

Activity

0

LoRa sensor send. Zero out gusting/max wind speed.

1

Wind speed measure and update max wind speed.

2

Wind speed measure and update max wind speed.

3

Wind speed measure and update max wind speed.

4

Wind speed measure and update max wind speed.

5

LoRa hardware send.

6

Wind speed measure and update max wind speed.

7

Wind speed measure and update max wind speed.

8

Wind speed measure and update max wind speed.

9

Wind speed measure and update max wind speed.

Every cycle is an opportunity to gather max wind speed data. Max speed and single sample speed data are sent on every bootCount%10==0 cycle. Not only do we receive instantaneous wind speed, but max wind speed over the last 10 measurement cycles ( or 5 minutes in my default case).