Published

Early warning system for flash floods

Flash floods are very difficult to monitor in low lying areas due to their unpredictable nature.

AdvancedWork in progressOver 2 days661
Early warning system for flash floods

Things used in this project

Hardware components

ST X-NUCLEO-IKS01A3
×1
ST B-L072Z-LRWAN1
×1
Spectral 3 click
MIKROE Spectral 3 click
AS7263 NIR sensor
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×20

Software apps and online services

Helium Console
STM32CUBEPROG
STMicroelectronics STM32CUBEPROG
Package Manager
AWS IoT
Amazon Web Services AWS IoT
Cayenne
myDevices Cayenne

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Custom parts and enclosures

Enclosure for the components

Code

Libraries for spectral 3 click.

C/C++
In order to receiver the data from the spectral 3 click the following libraries has to be added in the code.
void applicationTask()
{
 spectral3_process();
 spectral3_cmdSingle(&cmdData[0]);
 spectral3_getData(&rspBuffer[0],&readData[0]);

 IntToStr(readData[0],text);
 mikrobus_logWrite( "-- R value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[1],text);
 mikrobus_logWrite( "-- S value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[2],text);
 mikrobus_logWrite( "-- T value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[3],text);
 mikrobus_logWrite( "-- U value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[4],text);
 mikrobus_logWrite( "-- V value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 IntToStr(readData[5],text);
 mikrobus_logWrite( "-- W value:", _LOG_TEXT );
 mikrobus_logWrite( text, _LOG_LINE );

 mikrobus_logWrite( "---------------------", _LOG_LINE );
 Delay_1sec();
}

Credits

Comments