ba58smith/lora-transmitter

ENH: Make each transmitter able to transmit different data

Closed this issue · 3 comments

Most will transmit battery voltage.
Some will transmit temp and humidity.
Some will transmit temp, pH, and other info relevant to a swimming pool.

Need to make the transmitter code flexible like that, and make the receiver code able to receive whatever.

Part of this will be to make each value being sent include an alarm condition:
0 = no alarm, non-zero means the value is "out of bounds" (which must be defined here in the transmitter code)
Non-zero alarm values represent the beep(s) to be played by the receiver. Examples:
1 = short beep
11 = 1 short, 1 long
121 = 1 short, 2 long, 1 short
Maximum value is 999: the receiver code won't work with anything larger.

I think the default Serial (and Serial1, and Serial2) Rx data buffer is 128 bytes, so make sure the whole packet (including whatever is added by the receiver - RSSI, SNR, anything else?) is no bigger than that.
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/uart.html#receiving

Done.