3-axis-compass : sample code doesn't work

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, jeremy882, crail.lyu969

Post Reply
pazgal
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Sun Oct 28, 2012 12:21 pm
Are you a staff member of seeedstudio?: no
Which products/projects are your favorite?: CUI32Stern

3-axis-compass : sample code doesn't work

Post by pazgal » Tue Jan 29, 2013 1:28 am

Hi,

I've downloaded the 3-axis-Compass example. But When I test it in the arduino program...
It returns :

Code: Select all

compass_Example:39: error: variable or field 'Output' declared void
compass_Example:39: error: 'MagnetometerRaw' was not declared in this scope
compass_Example:39: error: 'MagnetometerScaled' was not declared in this scope
compass_Example:39: error: expected primary-expression before 'float'
compass_Example:39: error: expected primary-expression before 'float'
compass_Example:36: error: 'HMC5883L' does not name a type
compass_Example.ino: In function 'void setup()':
compass_Example:50: error: 'compass' was not declared in this scope
compass_Example:50: error: 'HMC5883L' was not declared in this scope
compass_Example:58: error: 'Measurement_Continuous' was not declared in this scope
compass_Example.ino: In function 'void loop()':
compass_Example:67: error: 'MagnetometerRaw' was not declared in this scope
compass_Example:67: error: expected `;' before 'raw'
compass_Example:69: error: 'MagnetometerScaled' was not declared in this scope
compass_Example:69: error: expected `;' before 'scaled'
compass_Example:72: error: 'scaled' was not declared in this scope
compass_Example:96: error: 'raw' was not declared in this scope
compass_Example:96: error: 'Output' was not declared in this scope
compass_Example.ino: At global scope:
compass_Example:106: error: variable or field 'Output' declared void
compass_Example:106: error: 'MagnetometerRaw' was not declared in this scope
compass_Example:106: error: 'MagnetometerScaled' was not declared in this scope
compass_Example:106: error: expected primary-expression before 'float'
compass_Example:106: error: expected primary-expression before 'float'
I'm new to arduino language, if someone could explain to me why the example code from seed returns this error it would be realy nice. I've allready success whith the grove I²C barometer and temperature sensor whithout any problem.

Thanks for help

User avatar
loovee
Elementary-3
Elementary-3
Posts: 352
Joined: Fri Nov 02, 2012 9:15 am

Re: 3-axis-compass : sample code doesn't work

Post by loovee » Fri Feb 15, 2013 8:10 pm

welcome to Arduino world!!
you can download the demo code, and extract it to ...\arduino-1.0.1-windows\arduino-1.0.1\libraries . then it will works fine~
just try it~ cheers :lol:

Post Reply