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

Arduino - Web-based Joystick
Easy
  • 15
  • 4

Full instructions

This project shows how to control devices from anywhere using web-based joystick on smart phone

Distance Indicator Using Ultrasonic Sensor
Easy
  • 35
  • 3

Work in progress

This project lights a set of LED's depending upon the distance of the obstacle with respect to the ultrasonic sensor.

BluSpike - Community Driven BLE Sensor Network
Easy
  • 30
  • 2

Full instructions

Easy to build w/ off the shelf parts, BLE solar powered sensor array. Connect and share its data to the cloud and be rewarded with ethereum

NeoPixel Thermometer!
Easy
  • 90
  • 4

Full instructions

Transforms a NeoPixel ring into a cool thermometer

Arduino - Web-Based Thermometer
Easy
  • 1,035
  • 15

Full instructions

This project allows you to check temperature at home from anywhere using web browser.

Arduino - Have Fun with Color Sensor
Easy
  • 952
  • 13

Full instructions

This project shows how to change color of Minion using Arduino, PHPoC WiFi Shield and color sensor.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login