MPU 6050 Gyroscopic Sensor

SKU: B001

৳400 ৳380
The MPU6050 combines: 3-axis Accelerometer

#include <Wire.h>

#include <MPU6050.h>


MPU6050 mpu;


void setup() {

  Serial.begin(115200);

  Wire.begin();


  mpu.initialize();


  if (mpu.testConnection()) {

    Serial.println("MPU6050 Connected");

  }

}


void loop() {

  int16_t ax, ay, az;

  int16_t gx, gy, gz;


  mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);


  Serial.print("AX: "); Serial.print(ax);

  Serial.print(" AY: "); Serial.print(ay);

  Serial.print(" AZ: "); Serial.print(az);


  Serial.print(" GX: "); Serial.print(gx);

  Serial.print(" GY: "); Serial.print(gy);

  Serial.print(" GZ: "); Serial.println(gz);


  delay(500);

}

0.0

Average Rating

0.00% Recommended(1 of 3)
0%
0%
0%
0%
0%

Submit Your Review

Your email address will not be published. Required fields are marked *