- 29a Bùi Xuân Phái, P.Tây Thạnh, Quận Tân Phú, TPHCM
- linhkienduchuy2018@gmail.com
- 0942954739
Giao miễn phí trong nội thành TPHCM đối với đơn hàng trên 1 triệu đồng
Tặng ngay 50.000đ cho đơn hàng trên 2 triệu đồng
Module cảm biến gia tốc MPU-6050 GY-521 tích hợp gia tốc 3 trục + con quay hồi chuyển 3 trục giúp kiểm soát cân bằng hoặc định hướng chuyển động cho robot, máy bay, drone, tay cầm chơi game, hệ thống giữ thăng bằng cho camera/máy ảnh, nhận biết sự rơi, rung, lắc,…......
THÔNG SỐ KỸ THUẬT:
SƠ ĐỒ NỐI DÂY GIAO TIẾP VỚI ARDUINO:
CÀI ĐẶT THƯ VIỆN CHO ARDUINO:
CODE MẪU GIAO TIẾP ARDUINO VỚI MPU6050:
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>
Adafruit_MPU6050 mpu;
void setup(void) {
Serial.begin(115200);
// Try to initialize!
if (!mpu.begin()) {
Serial.println("Failed to find MPU6050 chip");
while (1) {
delay(10);
}
}
Serial.println("MPU6050 Found!");
// set accelerometer range to +-8G
mpu.setAccelerometerRange(MPU6050_RANGE_8_G);
// set gyro range to +- 500 deg/s
mpu.setGyroRange(MPU6050_RANGE_500_DEG);
// set filter bandwidth to 21 Hz
mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);
delay(100);
}
void loop() {
/* Get new sensor events with the readings */
sensors_event_t a, g, temp;
mpu.getEvent(&a, &g, &temp);
/* Print out the values */
Serial.print("Acceleration X: ");
Serial.print(a.acceleration.x);
Serial.print(", Y: ");
Serial.print(a.acceleration.y);
Serial.print(", Z: ");
Serial.print(a.acceleration.z);
Serial.println(" m/s^2");
Serial.print("Rotation X: ");
Serial.print(g.gyro.x);
Serial.print(", Y: ");
Serial.print(g.gyro.y);
Serial.print(", Z: ");
Serial.print(g.gyro.z);
Serial.println(" rad/s");
Serial.print("Temperature: ");
Serial.print(temp.temperature);
Serial.println(" degC");
Serial.println("");
delay(500);
}
3,000₫
5,000₫
180,000₫
95,000₫
40,000₫
15,000₫
2,000₫
6,000₫
6,000₫
7,000₫
13,000₫
25,000₫
45,000₫
25,000₫
25,000₫
170,000₫
90,000₫
150,000₫
40,000₫
45,000₫
40,000₫
40,000₫
40,000₫
150,000₫
40,000₫
400,000₫
600,000₫
18,000₫
20,000₫
40,000₫
75,000₫
355,000₫
280,000₫
550,000₫
355,000₫
280,000₫
70,000₫
165,000₫
165,000₫
90,000₫
Bình luận