Research Article

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

Algorithm 1

LoRa-based weather station.
S-1: Include the LoRa, SPI, Sparkfun AS3935, DHT, BMP085 and Talkie libraries.
S-2: Initialization.
S-3: Read the DHT sensor & calibrate the Humidity and Temperature values by calling dht.readTemperature() and dht.readHumidity().
S-4: Read the Pressure sensor by calling bmp.readPressure().
S-5: Read the LDR sensor by calling analogRead(34).
S-6: Read the Rain sensor by calling digitalRead(27).
S-7: If lightning interrupt is generated, then read the Interrupt register of the lightning detector and store the result in variable “I” If (I = = 0X01) Interrupt is due to Noise. If (I = = 0X04) Interrupt is due to Disturber. If (I = = 0X08) Interrupt is due to Lightning then estimate lightning distance by reading REG0x07 register.
S-8: Frame the all the sensor readings in the form of packet like “ST32H86P987R0LTL15E” and transfer the packet to Gateways through LoRa.
S-9: Repeat from S-3.