I am attempting to use the Adafruit MMC5603 magnetometer with my Arduino Uno via the former's I2C interface. I am using the Adafruit_MMC56x3 library as recommended by Adafruit. The pinout is quite simple (Vcc -> Uno 5V, GND -> Uno GND, SCL -> Uno SCL, SDA -> Uno SDA). Here are some pics for reference:
Image 1
Image 2
This is the test code I'm using:
Code: Select all
#include <Adafruit_MMC56x3.h>
void setup() {
Adafruit_MMC5603 mmc = Adafruit_MMC5603(12345);
Serial.begin(115200);
if (!mmc.begin(MMC56X3_DEFAULT_ADDRESS, &Wire)) {
Serial.println("Oops, no MMC5603 detected ... Check your wiring!");
} else {
mmc.printSensorDetails();
}
}
void loop() {}
Every time I hit the "Oops, no MMC5603 detected" path. The green power indicator LED on the MMC5603 is on though so I'm hoping that's enough to know I didn't somehow fry anything. Running various I2C scanners also fails to find the device. When I try and manually check the result of `Wire.endTransmission()` (via the board's I2C address of 0x30) I get a return code of 2, which seems to correspond to received NACK on transmit of address according to the docs.
Is something somehow wrong with my setup? Or was the board just dead on arrival?