Things used in this project

Hardware components:
Ardgen 101
Arduino 101 & Genuino 101
×1
Tens70
9V battery (generic)
×1
Keystone 233 image 75px
9V Battery Clip
×1
Software apps and online services:
Ide web
Arduino IDE
FunguyPro Server
Hand tools and fabrication machines:
09507 01
Soldering iron (generic)

Code

Fall DetectorC/C++
//THIS CODE WAS CREATED ON 1/12/2017 THE CODE MAY BE OUTDATED BY THE TIME YOU USE IT, BUT YOU ARE WELCOME TO TRY
//CODE DEVELOPED BY FUNGUYPRO
//BLYNK IS REQUIRED
//USES BLE
//VISIT https:www.funguypro.net for more infomation

//#define BLYNK_DEBUG
#define BLYNK_PRINT Serial

//#define BLYNK_USE_DIRECT_CONNECT

#include <BlynkSimpleCurieBLE.h>
#include <CurieBLE.h>
#include "CurieIMU.h"


// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

BLEPeripheral  blePeripheral;

void setup() {
  Serial.begin(9600);
  delay(1000);

  CurieIMU.begin();
  //CurieIMU.attachInterrupt(eventCallback);
  CurieIMU.setDetectionThreshold(CURIE_IMU_SHOCK, 1500); // 1.5g = 1500 mg
  CurieIMU.setDetectionDuration(CURIE_IMU_SHOCK, 50);   // 50ms
  CurieIMU.interrupts(CURIE_IMU_SHOCK);

  blePeripheral.setLocalName("Funguy");
  blePeripheral.setDeviceName("Funguy");
  blePeripheral.setAppearance(384);

  Blynk.begin(blePeripheral, auth);

  blePeripheral.begin();

  Serial.println("Waiting for connections...");
}

void loop() {
  Blynk.run();
  blePeripheral.poll();
  if (CurieIMU.getInterruptStatus(CURIE_IMU_SHOCK)){
    Blynk.virtualWrite(V0, "t");
    Blynk.virtualWrite(V1, HIGH);
    Serial.println("GOT");
  }
}

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Water Softener
Easy
  • 265
  • 5

Full instructions

Sweeping frequency magnetic hard water conditioner

Know the Temp of Your Home From Anywhere with Arduino Cloud!
Easy
  • 1,246
  • 9

Full instructions

Ever wanted to know the temperature of your home from somewhere? Here's an easy way to do it with Arduino Cloud and the Yun Shield!

Simple Obstacle Senor With Arduino
Easy
  • 88
  • 2

Full instructions

I am gonna show you how to make a simple obstacle sensing system with cheap parts like IR LED and photo diode.

Safe City: A Device to Keep You Safe
Easy
  • 630
  • 6

Full instructions

The device will keep you safe. Just have to click a button and your precise location will be shared.

Arduino UNO Home Automation using Bluetooth HC05 module
Easy
  • 13
  • 1

Protip

Home Automation Attributes: Turning ON/OFF light bulb (AC 220V). Automatically Turning the Led ON/OFF depending on light intensity.

Connect Your Thinxtra Xkit Using Sigfox
Easy
  • 130
  • 2

Protip

Learn how to build an IoT application over Sigfox integrated with Ubidots - send temp readings based on motion sensors.

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog