[Avi Gupta] recently sent in their LoRaSense RGB Pi HAT project. This “HAT” (Hardware Attached to Top) is for any Raspberry Pi with 40-pin header. The core of the build is the custom printed circuit board which houses the components and interconnects. The components include an SHT31 temperature and humidity sensor, an SX1278 LoRa module, and a 10 amp 220 VAC relay. The interconnects include support for UART, I2C, SPI, and WS2812B RGB LED interfaces as well as a stackable header for daisy chaining HATs.
The attached components in combination support a wide range of use cases. Possible uses for this Raspberry Pi HAT include smart home systems, agricultural projects, industrial monitoring, smart greenhouse, remote weather stations, or alerting systems. You can detect weather conditions, send and receive information, switch mains powered loads, and use RGB LEDs for status and alerting.
If you’re interested in LoRa technology be sure to read about the Yagi antenna that sends LoRa signals farther.






The architecture is quite straightforward. The ESP32 based sensor nodes publish their readings to an MQTT broker running on the Raspberry Pi. The Pi subscribes to these sensor node topics to pick up the relevant sensor data. This makes it easy to add additional sensor nodes in future. Weather forecast data is collected by connecting to the OpenWeatherMap API. All of the collected information is then displayed through an app built using the Kivy: open source Python app development framework. 