Hello, i have the 10 dof 10dof gy87. i use the scanner, it finds just the the mpu and the baro but not the compass ?? what is the problem ![]()
I2C Scanner
Scanning...
I2C device found at address 0x68 !
I2C device found at address 0x77 !
done
Hello, i have the 10 dof 10dof gy87. i use the scanner, it finds just the the mpu and the baro but not the compass ?? what is the problem ![]()
I2C Scanner
Scanning...
I2C device found at address 0x68 !
I2C device found at address 0x77 !
done
(deleted)
i didn't understand ?? what do you mean
jone31:
i didn't understand ?? what do you mean
Please provide a link to the device that you are using so that we can see the specs.
I know that a picture is said to be worth a thousand words but I was hoping for more detail about the device.
the product is GY87 10 dof mpu6050 hmc5883l bmp180
(deleted)
(deleted)
Hi i strange thing, when i use this code
#include "Wire.h"
#include "I2Cdev.h"
#include "MPU6050.h"
#include "HMC5883L.h"
MPU6050 accelgyro;
HMC5883L mag;
int16_t ax, ay, az;
int16_t gx, gy, gz;
int16_t mx, my, mz;
#define LED_PIN 13
bool blinkState = false;
void setup() {
Wire.begin();
accelgyro.setI2CMasterModeEnabled(false);
accelgyro.setI2CBypassEnabled(true) ;
accelgyro.setSleepEnabled(false);
Serial.begin(9600);
// initialize device
Serial.println("Initializing I2C devices...");
accelgyro.initialize();
mag.initialize();
Serial.println(mag.testConnection() ? "HMC5883L connection successful" : "HMC5883L connection failed");
// verify connection
Serial.println("Testing device connections...");
Serial.println(accelgyro.testConnection() ? "MPU6050 connection successful" : "MPU6050 connection failed");
// configure Arduino LED for
pinMode(LED_PIN, OUTPUT);
}
void loop() {
accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
mag.getHeading(&mx, &my, &mz);
// display tab-separated accel/gyro x/y/z values
Serial.print("a/g:\t");
Serial.print(ax); Serial.print("\t");
Serial.print(ay); Serial.print("\t");
Serial.print(az); Serial.print("\t");
Serial.print(gx); Serial.print("\t");
Serial.print(gy); Serial.print("\t");
Serial.print(gz);Serial.print("\t");
Serial.print("mag:\t");
Serial.print(mx); Serial.print("\t");
Serial.print(my); Serial.print("\t");
Serial.print(mz); Serial.print("\t");
// To calculate heading in degrees. 0 degree indicates North
float heading = atan2(my, mx);
if(heading < 0)
heading += 2 * M_PI;
Serial.print("heading:\t");
Serial.println(heading * 180/M_PI);
// blink LED to indicate activity
blinkState = !blinkState;
digitalWrite(LED_PIN, blinkState);
delay (50);
}
and after i use the i22c scan i find the device . but when i restart arduino and i run the scanner again, the device not found ? why !!!!
(deleted)
Ok thanks ![]()