This Arduino project utilizes LoRa communication to create a sensor node that measures temperature, humidity, and battery voltage. It sends the collected data to a LoRa gateway at predefined intervals.
- Arduino board (ESP32)
- LoRa module
- AHTX0 Temperature and Humidity Sensor
- Voltage divider circuit for battery monitoring
- ArduinoJson library
- LoRa library
- Adafruit AHTX0 library
- Connect the AHTX0 sensor and the LoRa module to the Arduino board as per the wiring instructions.
- Install the required libraries: ArduinoJson, LoRa, and Adafruit AHTX0.
- Upload the provided code to your Arduino board.
- Power up the Arduino board.
- Measures temperature and humidity using the AHTX0 sensor.
- Monitors battery voltage to track battery level.
- Sends sensor data to a LoRa gateway at regular intervals.
- Receives configuration parameters (SyncWord, TxPower, etc.) via LoRa to update settings dynamically.
- Utilizes deep sleep mode to conserve power between transmissions.
- The code can be configured with different LoRa settings such as SyncWord, TxPower, and frequency.
- Modify the
enddeviceslist
array to include the names of your end devices. - Adjust the
defaultSyncWord
,defaultTxPower
,defaultfreq
,defaultinterval
,defaultSpreadingFactor
, anddefaultSignalBandwidth
variables to set default LoRa parameters. - Define the
user
andtimeout
constants according to your requirements.
- Ensure proper wiring and power supply for the Arduino board.
- Monitor serial output for debugging messages.
- Adjust LoRa settings and sensor readings as necessary.
- Customize the code for additional functionality or sensor integration.
This project is licensed under the MIT License.