Things used in this project

Hardware components:
A000066 iso both
Arduino Arduino UNO & Genuino UNO
×1
HC-06 Bluetooth module
×1
Adafruit ADXL345 accelerometer module
×1
Male-male and male-female jumper wires
×1
Mini-breadboard
×1
Lumia 1520 or other Windows Phone 10 compatible device
×1
ORICO Bluetooth module
×1
Software apps and online services:
10
Microsoft Windows 10 IoT Core
W9gt7hzo
Microsoft Microsoft Azure
Vs2015logo
Microsoft Visual Studio 2015
Ide web
Arduino Arduino IDE

Schematics

Complete Schematic
ADXL345 + HC-06
Complete Schematic.fzz
ADXL345
Sketch for ADXL345 Connection
ADXL345.fzz
Sketch for Bluetooth Module Connection
hc-06.fzz

Code

Arduino Sketch (ADXL345_HC06.ino)Arduino
ADXL345 Accelrometer + HC-06 Bluetooth Module
#include <Wire.h>  
#include <String.h>  

#define Register_ID 0
#define Register_2D 0x2D
#define Register_X0 0x32
#define Register_X1 0x33
#define Register_Y0 0x34
#define Register_Y1 0x35
#define Register_Z0 0x36
#define Register_Z1 0x37


int ADXAddress = 0xA7 >> 1; 
int reading = 0;
int val = 0;
int X0, X1, X_out;
int Y0, Y1, Y_out;
int Z1, Z0, Z_out;
double Xg, Yg, Zg;

void setup()
{
  Serial.begin(9600);
  Wire.begin(); 
  delay(100);
  Wire.beginTransmission(ADXAddress);
  Wire.write(Register_2D);
  Wire.write(8);
  Wire.endTransmission();
}


void loop() {
  double tempx = 0;
  char strx[5];
  double tempy = 0;
  char stry[5];
  double tempz = 0;
  char strz[5];
  
  String gy;

  Wire.beginTransmission(ADXAddress);
  Wire.write(Register_X0);
  Wire.write(Register_X1);
  Wire.endTransmission();
  Wire.requestFrom(ADXAddress, 2);
  if (Wire.available() <= 2);
  {
    X0 = Wire.read();
    X1 = Wire.read();
    X1 = X1 << 8;
    X_out = X0 + X1;
  }

  Wire.beginTransmission(ADXAddress);
  Wire.write(Register_Y0);
  Wire.write(Register_Y1);
  Wire.endTransmission();
  Wire.requestFrom(ADXAddress, 2);
  if (Wire.available() <= 2);
  {
    Y0 = Wire.read();
    Y1 = Wire.read();
    Y1 = Y1 << 8;
    Y_out = Y0 + Y1;
  }

  Wire.beginTransmission(ADXAddress);
  Wire.write(Register_Z0);
  Wire.write(Register_Z1);
  Wire.endTransmission();
  Wire.requestFrom(ADXAddress, 2);
  if (Wire.available() <= 2);
  {
    Z0 = Wire.read();
    Z1 = Wire.read();
    Z1 = Z1 << 8;
    Z_out = Z0 + Z1;
  }

  Xg = X_out / 256.00; 
  Yg = Y_out / 256.00;
  Zg = Z_out / 256.00;
 
  if(Xg>0)
  {
    gy = String("")+ "x=+"+Xg;
  }
  else
  {
    gy = String("")+ "x="+Xg;
  }
  
  if(Yg>0)
  {
    gy += String("")+ "y=+"+Yg;
  }
  else
  {
    gy += String("")+ "y="+Yg;
  }
  
  if(Zg>0)
  {
    gy += String("")+ "z=+"+Zg+",";
  }
  else
  {
    gy += String("")+ "z="+Zg+",";
  } 
  
  Serial.print(gy);

}
Bluetooth Serial App
Communicates with Arduino via HC-06 bluetooth and sends ADXL345 data to Azure
FallDetectionClient
UWP client app for Fall Detection

Credits

Jiong Shi

Microsoft Windows Development MVP

Contact

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

IoT Based Garden Automation And Monitoring System
Advanced
  • 354
  • 10

Full instructions

Automate Your Garden with Arduino and Cayenne

URB (Universal Railway Model Bus)  - Automate Your Layout
Advanced
  • 103
  • 3

Work in progress

All features Arduino, plus: direct plug servos, motor drivers, high-current outputs, built-in I2C bus, convenient connections, and more.

Punch Activated Arm Flamethrowers (Real Firebending)
Advanced
  • 42,866
  • 328

Shoot fireballs from your fists when you throw a punch with these arm mounted smart flamethrowers!

Visual Capturing with OV7670 on Arduino
Advanced
  • 4,737
  • 24

Protip

This is an Arduino camera module, using the surveillance camera's digital image processing chip-OV0706.

Get Nostalgic and Use Nokia 84x48 LCD with Arduino
Advanced
  • 3,131
  • 14

Protip

These 84 by 48 pixel LCDs are what you might have found in Nokia 3310. And what about using them in the Arduino projects?

Smart Energy Monitor Based on Arduino
Advanced
  • 410
  • 3

Full instructions

Open source Smart energy monitor with some new features like "Terminal Commands " , "Readings Logger", "Data Plotting ".

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaFree StoreBlog