timmbogner / Farm-Data-Relay-System

A system that uses ESP-NOW, LoRa, and other protocols to transport sensor data in remote areas without relying on WiFi.
MIT License
485 stars 108 forks source link

2023 01 lora improvements #139

Closed aviateur17 closed 1 year ago

aviateur17 commented 1 year ago

Added PingFDRS to LoRA node code so that Node can ping gateway Moved ESP-NOW pingFDRS code to fdrs_node_espnow since the code was split from one header file to several header files Tweaked sleepFDRS function so that it doesn't say sleepytime since if DEEP_SLEEP is commented out the controller does not actually go to sleep. Added crcResult return type to transmitLoRa functions so that the calling functions can actually know whether the packet was transmitted successfully and that information can be used in calling functions. This seems to be moreso used in nodes and not so much in gateways at the current time but gateway use of crcResult return type can be developed at a later time if need be. Used Arduino 1.8.19 to compile gateway, sensor, and controller sketches on ESP32 board type with ESP-NOW enabled and separately with LoRa enabled. Tweaked ESP-NOW debug message to properly include units for ping time and MAC address for ESP-NOW address being pinged.

timmbogner commented 1 year ago

Coincidence: Right as you were posting this I was finishing up OLED display for nodes and noticing that "Sleepytime!" was now sort of wasting screen space.

I'll look at this and pull it tomorrow morning.