Download Tokopedia App
Tentang TokopediaMulai Berjualan PromoTokopedia Care
tokopedia-logo
Kategori
Atur jumlah dan catatan

Stok Total: 140

Subtotal

Rp22.000

HMC5883L Sensor Kompas 3 Axis Magnetometer

Rp22.000
  • Kondisi: Baru
  • Min. Pemesanan: 1 Buah
  • Etalase: Sensor-Sensor
Sebelum Order Tanya stok dulu via diskusi atau cek stok di web resmi jogjarobotika ( buka web jogjarobotika com search nama produk)
Toko kami sudah berpengalaman sejak 2011 di bidang penjualan sparepart online/offline.
Pengiriman komponen anda aman dengan packing dus dan bubble pack (free).

Detail : Cek Gambar
Harga adalah untuk 1pcs
+==================================================================+

Seperti pada kompas, modul ini dapat digunakan untuk menemukan gaya magnet bumi . Modul kompas juga dapat digunakan untuk mengukur kekuatan dari sumber magnet terdekat.

Name: Q MC5883L module (three-axis magnetic field module)
Model: GY-271 using chip: Q MC5883L
Power supply: 3-5v
Communication method: IIC communication protocol
Measuring range: 1.3-8 Gauss


#include Wire.h //I2C Arduino Library

#define addr 0x0D //I2C Address for The HMC5883

void setup() {

Serial.begin(9600);
Wire.begin();

Wire.beginTransmission(addr); //start talking
Wire.write(0x0B); // Tell the HMC5883 to Continuously Measure
Wire.write(0x01); // Set the Register
Wire.endTransmission();
Wire.beginTransmission(addr); //start talking
Wire.write(0x09); // Tell the HMC5883 to Continuously Measure
Wire.write(0x1D); // Set the Register
Wire.endTransmission();
}

void loop() {
int x, y, z; //triple axis data

//Tell the HMC what regist to begin writing data into

Wire.beginTransmission(addr);
Wire.write(0x00); //start with register 3.
Wire.endTransmission();

//Read the data.. 2 bytes for each axis.. 6 total bytes
Wire.requestFrom(addr, 6);
if (6 <= Wire.available()) {
x = Wire.read(); //MSB x
x |= Wire.read() << 8; //LSB x
z = Wire.read(); //MSB z
z |= Wire.read() << 8; //LSB z
y = Wire.read(); //MSB y
y |= Wire.read() << 8; //LSB y
}

// Show Values
Serial.print("X Value: ");
Serial.println(x);
Serial.print("Y Value: ");
Serial.println(y);
Serial.print("Z Value: ");
Serial.println(z);
Serial.println();

delay(500);
}
Ada masalah dengan produk ini?

ULASAN PEMBELI

4.9/ 5.0

95% pembeli merasa puas

20 rating • 4 ulasan

5(19)95%
4(0)0%
3(1)5%
2(0)0%
1(0)0%