- تحميل الكود أردوينو :
// Project : Interface Arduino and the MPU6050 Sensor
// By : DIY Channel
// My Youtube Channel : https://www.youtube.com/c/DIYChannel2019
#include<Wire.h>
const int MPU_addr=0x68;
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;
void setup(){
Wire.begin();
Wire.beginTransmission(MPU_addr);
Wire.write(0x6B);
Wire.write(0);
Wire.endTransmission(true);
Serial.begin(9600);
}
void loop(){
Wire.beginTransmission(MPU_addr);
Wire.write(0x3B);
Wire.endTransmission(false);
Wire.requestFrom(MPU_addr,14,true);
AcX=Wire.read()<<8|Wire.read();
AcY=Wire.read()<<8|Wire.read();
AcZ=Wire.read()<<8|Wire.read();
Tmp=Wire.read()<<8|Wire.read();
GyX=Wire.read()<<8|Wire.read();
GyY=Wire.read()<<8|Wire.read();
GyZ=Wire.read()<<8|Wire.read();
Serial.print("AcX = "); Serial.print(AcX);
Serial.print(" | AcY = "); Serial.print(AcY);
Serial.print(" | AcZ = "); Serial.print(AcZ);
Serial.print(" | Tmp = "); Serial.print(Tmp/340.00+36.53);
Serial.print(" | GyX = "); Serial.print(GyX);
Serial.print(" | GyY = "); Serial.print(GyY);
Serial.print(" | GyZ = "); Serial.println(GyZ);
delay(333);
}
-------------------------------------------------------------------------
mpu6050,mpu-6050,mpu6050 tutorial,mpu6050 arduino,interface dc motor with gyro mpu6050,mpu6050 sensor,mpu6050 arduino tutorial,mpu6050 calibration,lcd interface,accelerometer mpu6050,mpu6050 working,arduino mpu6050,#mpu6050,mpu6050 drone,robot mpu6050,mpu6050 board,tangible user interface,mpu6050 raspberry pi,mpu6050 arduino nano,mpu6050 library,mpu6050 projects,mpu6050 breakout,arduino uno and mpu6050,mpu6050 sensor working,serial peripheral interface,esp32 web server mpu6050
No comments:
Post a Comment