Research Article

Experimental Evaluation of Lightning and Weather Alert Methods in Rural India using LoRa and IoT Technology with Nanosensors

Algorithm 2

LoRa-based gateway at announcement module.
S-1: Include the LoRa and SPI libraries.
S-2: Initialize the Serial, SPI, and LoRa communications.
S-3: Check for LoRa packet is arriving from weather station or not. If a packet is available, then gateway receives the entire packet and stores in the array ā€œCā€ and ESP32 process the array for individual sensor readings.
S-4: If sensor readings are abnormal then gateway sends this information to announcement module through serial pins.
S-5: Repeat from S-3.