On Github we started a collection of RUI3 examples that go above the simple examples provided with the RUI3 BSP’s.
I wrote these examples and they were scattered all over Github, some as RAKwireles repos, some in my own account. For easier access, I put them into this collection. Distributions from the community are welcome to be added to this collection.
IMPORTANT
These examples require at least RUI3 V4.1.1 or newer.
At the time this code was published, RUI3 V4.1.1 was still in staging. It can be installed by using the Arduino BSP JSON file for the staging version from
https://raw.githubusercontent.com/RAKWireless/RAKwireless-Arduino-BSP-Index/staging/RUI_4.1.1_266/package_rakwireless_com_rui_index.json
in the Additional Boards Manager URLs
setting in ArduinoIDE.
Installation guides for Arduino IDE and Visual Studio Code can be found in the RAK Documentation Center.
At the moment 8 examples are available, but I am working to add more in the future:
RUI3-LowPower-Example
This simple example is just showing how to design an application that is event based and keeps the MCU and LoRa transceiver in low power mode whenever possible.
It includes as well a simple example how to implement custom AT commands.
RUI3-RAK1901-RAK1902-Example
A simple sensor application based on RAK1901 and RAK1902. It reads temperature, humidity and barometric pressure from these sensors and sends them in a configurable interval.
This example is using the Cayenne LPP data format to send the formatted payload.
RUI3-RAK12500-RAK1904-GNSS
A motion based location tracker using the RAK12500 and RAK1904 WisBlock modules. Based on the RUI3-LowPower-Example code.
This example is using the Cayenne LPP data format to send the formatted payload.
RUI3-RAK13011-Alarm
A door or window alarm system using the RAK13011 magnetic relay switch module. This examples features the usage of a queue to collect events. For the alarm system (or open/close counter), this was necessary, because events could be triggered faster than the uplink packets can be sent over LoRaWAN.
RUI3-RAK5811-Example
Example code for using the RAK5811 0-5V analog input module with RUI3. For lowest power consumption, the RAK5811 is powered down until a data reading is required. The interval time for reading the data can be setup with AT command.
RUI3-Sensor-Node-Air-Quality
A sensor application that combines temperature, humidity, barometric pressure, CO2 and VOC sensing. It detect automatically which sensors are attached and adjusts its payload to the available sensor data. It supports WisBlock RAK1906, RAK12037 and RAK12047 sensor modules
RUI3-Signal-Meter-P2P-LPWAN
This is a PoC of a very basic signal tester. It works in both LoRa P2P and LoRaWAN mode. It uses a simple OLED display and has no GUI. All settings are done over USB with RUI3 AT commands.
It is a very simple (~30 US$ cheap) device that can help to check LoRa and LoRaWAN coverage. It does not claim to be a super precise instrument, it is just an affordable small instrument to check signal coverage.
RUI3 Modbus Master example
This example is a simple Modbus Master that reads sensor values from a Modbus Slave. For easy testing a Modbus Slave application is available for another WisBlock/WisDuo based module with a temperature, humidity and barometric pressure sensor.