SOLVED!!: WORKING WITH GY-87.... EVERYTHING OK BUT HMC5883L NOT WORKING AT ALL
hi everybody,
first of all, hope in right forum.... xd
i'm building project using arduino due along gy-87, 10dof imu....3 accel + 3 gyros (mpu-6050), barometer (bmp-180) , ... 3-axis magnetometer....
the mpu-6050 working beautifully. xd
the bmp-180 working beautifully.... bmp-085 library... i'm guessing gy-87 comes sensor... :~
finally, magnetometer hmc5883l, address 0x1e, , it's not working @ all. i've tried many... many libraries no results. read lot of forums , posts, including many wrote in arduino forums. =(
has been able make hmc5883l sensor work yet?
can point me in right direction?
thank in advance time!!!
first of all, hope in right forum.... xd
i'm building project using arduino due along gy-87, 10dof imu....3 accel + 3 gyros (mpu-6050), barometer (bmp-180) , ... 3-axis magnetometer....
the mpu-6050 working beautifully. xd
the bmp-180 working beautifully.... bmp-085 library... i'm guessing gy-87 comes sensor... :~
finally, magnetometer hmc5883l, address 0x1e, , it's not working @ all. i've tried many... many libraries no results. read lot of forums , posts, including many wrote in arduino forums. =(
has been able make hmc5883l sensor work yet?

can point me in right direction?

thank in advance time!!!
hello pistolero992000,
have used nick gammon's i2c scanner confirm due recognize address of magnetometer?
here code in case:
i have used different i2c magnetometer adxl345 @ moment don't have code @ hand.
regards, palliser
have used nick gammon's i2c scanner confirm due recognize address of magnetometer?
here code in case:
code: [select]
// --------------------------------------
// i2c_scanner
//
// version 1
// program (or code looks it)
// can found in many places.
// example on arduino.cc forum.
// original author not know.
// version 2, juni 2012, using arduino 1.0.1
// adapted simple possible arduino.cc user krodal
// version 3, feb 26 2013
// v3 louarnold
// version 4, march 3, 2013, using arduino 1.0.3
// arduino.cc user krodal.
// changes louarnold removed.
// scanning addresses changed 0...127 1...119,
// according i2c scanner nick gammon
// http://www.gammon.com.au/forum/?id=10896
// version 5, march 28, 2013
// version 4, address scans 127.
// sensor seems use address 120.
//
//
// sketch tests standard 7-bit addresses
// devices higher bit address might not seen properly.
//
#include <wire.h>
void setup()
{
wire.begin();
serial.begin(9600);
serial.println("\ni2c scanner");
}
void loop()
{
byte error, address;
int ndevices;
serial.println("scanning...");
ndevices = 0;
for(address = 1; address < 127; address++ )
{
// i2c_scanner uses return value of
// write.endtransmisstion see if
// device did acknowledge address.
wire.begintransmission(address);
error = wire.endtransmission();
if (error == 0)
{
serial.print("i2c device found @ address 0x");
if (address<16)
serial.print("0");
serial.print(address,hex);
serial.println(" !");
ndevices++;
}
else if (error==4)
{
serial.print("unknow error @ address 0x");
if (address<16)
serial.print("0");
serial.println(address,hex);
}
}
if (ndevices == 0)
serial.println("no i2c devices found\n");
else
serial.println("done\n");
delay(5000); // wait 5 seconds next scan
}
i have used different i2c magnetometer adxl345 @ moment don't have code @ hand.
regards, palliser
Arduino Forum > Products > Arduino Due (Moderator: fabioc84) > SOLVED!!: WORKING WITH GY-87.... EVERYTHING OK BUT HMC5883L NOT WORKING AT ALL
arduino
Comments
Post a Comment