Giter VIP home page Giter VIP logo

esp8266_mpu6050's Issues

How can i include YAW value in esp8266 code?

I have esp8266 ic with MPU6050 .

i am use a github librery to connect both the modules

its work well for displaying PITCH and ROLL but its not display the YAW value.

How can i include YAW value in this code?

is it possible to calculate YAW value from both PITCH and ROLL.

The code is given below

`#include <Wire.h>
#include <ESP8266WiFi.h>
#include <MPU6050.h>

MPU6050 mpu;

int SCL_PIN=D1;
int SDA_PIN=D2;

void setup()
{
WiFi.forceSleepBegin();// turn off ESP8266 RF
delay(1);
Serial.begin(9600);

Serial.println("Initialize MPU6050");

while(!mpu.beginSoftwareI2C(SCL_PIN,SDA_PIN,MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
{
Serial.println("Could not find a valid MPU6050 sensor, check wiring!");
delay(500);
}
}

void loop()
{
// Read normalized values
Vector normAccel = mpu.readNormalizeAccel();

// Calculate Pitch & Roll
int pitch = -(atan2(normAccel.XAxis, sqrt(normAccel.YAxisnormAccel.YAxis + normAccel.ZAxisnormAccel.ZAxis))*180.0)/M_PI;
int roll = (atan2(normAccel.YAxis, normAccel.ZAxis)*180.0)/M_PI;

// Output
Serial.print(" Pitch = ");
Serial.print(pitch);
Serial.print(" Roll = ");
Serial.print(roll);

Serial.println();

delay(10);
}`

Fall detection not interrupts

I am using MP6050 with ESP12F. I have connected vcc, gnd, i2c in D1 and D2, and INT in D7 in ESP12F, but the code doesn't interrupt in case of fall detection. I need help.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.