Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ void setup()

SPI.begin();

if (myMag.begin(csPin) == false)
while (myMag.begin(csPin) == false)
{
Serial.println("MMC5983MA did not respond - check your wiring. Freezing.");
while (true)
;
Serial.println("MMC5983MA did not respond. Retrying...");
delay(500);
myMag.softReset();
delay(500);
}

Serial.println("MMC5983MA connected");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ void setup()

SPI.begin();

if (myMag.begin(csPin) == false)
while (myMag.begin(csPin) == false)
{
Serial.println("MMC5983MA did not respond - check your wiring. Freezing.");
while (true)
;
Serial.println("MMC5983MA did not respond. Retrying...");
delay(500);
myMag.softReset();
delay(500);
}

Serial.println("MMC5983MA connected");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ void setup()
pinMode(interruptPin, INPUT);
attachInterrupt(digitalPinToInterrupt(interruptPin), interruptRoutine, RISING);

if (myMag.begin(csPin) == false)
while (myMag.begin(csPin) == false)
{
Serial.println("MMC5983MA did not respond - check your wiring. Freezing.");
while (true)
;
Serial.println("MMC5983MA did not respond. Retrying...");
delay(500);
myMag.softReset();
delay(500);
}

myMag.softReset();
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun MMC5983MA Magnetometer Arduino Library
version=1.0.3
version=1.1.0
author=SparkFun Electronics
maintainer=SparkFun Electronics
sentence=A I2C/SPI library for the MMC5983MA magnetic compass sensor.
Expand Down
Loading