I get this error with the code below which is very frustrating because I can't get the values I need without it.
ERROR MESSAGE:
Arduino: 1.6.5 (Mac OS X), Board: "Arduino/Genuino Uno"
Build options changed, rebuilding all
HMC5883L_calibrate_Tweaked.ino: In function 'void setup()':
HMC5883L_calibrate_Tweaked:26: error: 'class HMC5883L' has no member named 'begin'
HMC5883L_calibrate_Tweaked:32: error: 'class HMC5883L' has no member named 'setRange'
HMC5883L_calibrate_Tweaked:32: error: 'HMC5883L_RANGE_1_3GA' was not declared in this scope
HMC5883L_calibrate_Tweaked:35: error: 'class HMC5883L' has no member named 'setMeasurementMode'
HMC5883L_calibrate_Tweaked:35: error: 'HMC5883L_CONTINOUS' was not declared in this scope
HMC5883L_calibrate_Tweaked:38: error: 'class HMC5883L' has no member named 'setDataRate'
HMC5883L_calibrate_Tweaked:38: error: 'HMC5883L_DATARATE_30HZ' was not declared in this scope
HMC5883L_calibrate_Tweaked:41: error: 'class HMC5883L' has no member named 'setSamples'
HMC5883L_calibrate_Tweaked:41: error: 'HMC5883L_SAMPLES_8' was not declared in this scope
HMC5883L_calibrate_Tweaked.ino: In function 'void loop()':
HMC5883L_calibrate_Tweaked:46: error: 'Vector' was not declared in this scope
HMC5883L_calibrate_Tweaked:46: error: expected ';' before 'mag'
HMC5883L_calibrate_Tweaked:49: error: 'mag' was not declared in this scope
HMC5883L_calibrate_Tweaked:50: error: 'mag' was not declared in this scope
HMC5883L_calibrate_Tweaked:51: error: 'mag' was not declared in this scope
HMC5883L_calibrate_Tweaked:52: error: 'mag' was not declared in this scope
Multiple libraries were found for "HMC5883L.h"
Used: /Users/michaelknight/Documents/Arduino/libraries/HMC5883L
Not used: /Users/michaelknight/Documents/Arduino/libraries/Arduino-HMC5883L-master
'class HMC5883L' has no member named 'begin'
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
/*
Calibrate HMC5883L. Output for HMC5883L_calibrate_processing.pde
Read more: http://www.jarzebski.pl/arduino/czujniki-i-sensory/3-osiowy-magnetometr-hmc5883l.html
GIT: https://github.com/jarzebski/Arduino-HMC5883L
Web: http://www.jarzebski.pl
(c) 2014 by Korneliusz Jarzebski
*/
#include <Wire.h>
#include <HMC5883L.h>
HMC5883L compass;
int minX = 0;
int maxX = 0;
int minY = 0;
int maxY = 0;
int offX = 0;
int offY = 0;
void setup()
{
Serial.begin(9600);
// Initialize Initialize HMC5883L
while (!compass.begin())
{
delay(500);
}
// Set measurement range
compass.setRange(HMC5883L_RANGE_1_3GA);
// Set measurement mode
compass.setMeasurementMode(HMC5883L_CONTINOUS);
// Set data rate
compass.setDataRate(HMC5883L_DATARATE_30HZ);
// Set number of samples averaged
compass.setSamples(HMC5883L_SAMPLES_8);
}
void loop()
{
Vector mag = compass.readRaw();
// Determine Min / Max values
if (mag.XAxis < minX) minX = mag.XAxis;
if (mag.XAxis > maxX) maxX = mag.XAxis;
if (mag.YAxis < minY) minY = mag.YAxis;
if (mag.YAxis > maxY) maxY = mag.YAxis;
// Calculate offsets
offX = (maxX + minX)/2;
offY = (maxY + minY)/2;
/*Serial.print(mag.XAxis);
Serial.print(":");
Serial.print(mag.YAxis);
Serial.print(":");
Serial.print(minX);
Serial.print(":");
Serial.print(maxX);
Serial.print(":");
Serial.print(minY);
Serial.print(":");
Serial.print(maxY);
Serial.print(":");*/
Serial.print(offX);
Serial.print(":");
Serial.print(offY);
Serial.print("\n");
}





