Step 1: Mounting WisBlock Parts
Assemble the RAK3372 WisBlock Core onto the RAK19003 WisBlock Base Board. Connect the RAK12005 water level sensor and the RAK12039 GNSS location sensor to available slots. Attach the RAK1921 power module. Insert an active SIM card into the RAK3372 module.
Step 2: Link to PC (via USB Cable)
Connect the assembled WisBlock unit (via the RAK3372) to your PC using a standard USB cable.
Step 3: Setup Arduino IDE and Load Files
Configure Arduino IDE for the RAK3372. Install necessary libraries for the RAK12005 water level sensor and TinyGPS++ (for RAK12039). You will also need libraries for cellular communication (e.g., TinyGSM or RAKwireless specific examples for RAK3372's modem). Load the Arduino sketch that reads water level and GPS data, then sends it via cellular (MQTT) to AWS IoT Core.
Step 4: Upload the Code
Select RAK3372 Board and the correct COM port. Upload the code to your WisBlock device. After successful upload, open the Serial Monitor (set Baud rate to 15200) to observe water level readings, GPS coordinates, and cellular network registration/data transmission status. The device will periodically send water level data (and its location) directly via cellular NB-IoT/LTE-M to AWS IoT Core. AWS IoT Core will then process this data, triggering alerts via Amazon SNS if the water level exceeds predefined thresholds (indicating flood risk). Grafana can be integrated with AWS to visualize historical water levels and alert status.
Explanation: The code initializes the RAK3372 cellular module, the RAK12005 water level sensor, and the RAK12039 GNSS sensor. It periodically reads the water level and obtains the current GPS coordinates. This data is then formatted into a JSON payload and sent via MQTT over the cellular network directly to AWS IoT Core. AWS IoT Core rules are configured to ingest this data. An AWS Lambda function or AWS IoT Analytics can process this data to detect flood conditions (e.g., water level exceeding a critical threshold). Upon detection, Amazon SNS is used to send immediate alerts (SMS, email) to emergency services or affected communities, enabling timely flood mitigation and public safety measures.








_M6kErcYJ84.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments