mcci-catena / arduino-lorawan

User-friendly library for using arduino-lmic with The Things Network and other LoRaWAN® networks
MIT License
274 stars 54 forks source link

ESP32 example with deep sleep and fast re-joining after wake-up #205

Closed matthias-bs closed 1 year ago

matthias-bs commented 1 year ago

Example sketch showing how to periodically poll a sensor and send the data to The Things Network.

Based on simple_sensor_bme280.ino with the following modifications:

matthias-bs commented 1 year ago

Added fix for compiler warning with Arduino core v2.0.x

Warning:

/home/runner/Arduino/libraries/MCCI_Arduino_LoRaWAN_Library/src/Arduino_LoRaWAN.h:965:87: warning: missing initializer for member 'Arduino_LoRaWAN::SessionStateHeader::Size' [-Wmissing-field-initializers]
         SessionState m_savedSessionState { .Header = { .Tag = kSessionStateTag_Null } };

Fix:

SessionState m_savedSessionState { .Header = { .Tag = kSessionStateTag_Null, .Size = 0 } };
terrillmoore commented 1 year ago

Thanks, sorry for the delay in review.

terrillmoore commented 1 year ago

Pull request adopted and merged to master after rebase. Thanks!

matthias-bs commented 1 year ago

Thanks!