.
Overview.
I am building a Panic Button using Rapid IoT Kit. In the project, I use Tap Detection as a mechanism to indicate there is a situatio of panic. To minimize false alarm, only tap count of greater than 5 will trigger an IFTTT applet which will send a notification on a mobile device. There is a Clear button for clearing the tap count.
.
Setup Rapid IoT.
Follow this Hardware and Software Documentation to setup the IoT Kit.
.
Using Rapid IoT Studio.
The IoT Studio is easy to use. There are many user references for this purpose:
.
Using IFTTT.
Create an IFTTT webhook at IFTTT website.
The trigger URL is of the form: https://maker.ifttt.com/trigger/{applet name}/with/key/{your key}
.
Screenshots.
.
.
.
.
.
.
Video.
Video at youtube: https://youtu.be/lqRrIr4Fsi8
.
Codes.
I modifid the code from Rapid IoT Weather Station source. I removed all the other sensors code, except the light sensor reading. I added the Tap Detection function and the code which update and clear the tap count. At the Application part, I add a WebIO which will trigger the "trigger panic" applet if the tap count is greater than 5.
ATMO_Status_t ClearTapCount_trigger(ATMO_Value_t *in, ATMO_Value_t *out) {
ATMO_CreateValueUnsignedInt(out, 0);
return ATMO_Status_Success;
}
The above code clears the tap count.
ATMO_Status_t Increment_performOperation(ATMO_Value_t *in, ATMO_Value_t *out) {
return ATMO_PerformOperation(out, ATMO_PROPERTY(Increment, operation), ATMO_PROPERTY(Increment, operand), in);
}
And the above increments the count.
.
Summary.
I use the Tap Detection in this project, but one can use other mechanism like Fall Detection and buttons on the IoT Kit to act as Panic Button. In this project, I did not build a proper mobile app for the Panic Button. As a future enhancement, ne such app can be built so that various settings and configurations can be made.
.
.
Comments