//#define SCALE //use this to scale each axis if the test data does not give a circular (spherical 3D) plot
// done as #def for max performance of code not using the scale factors!

// use to switch the serial output data to a CSV format of raw x,y,z data values to help calibrate your compass
#define RAW_DATA_CSV
// ALSO use this #def to format output to easly paste into a data array - eg to display data in Processing. See usabledevices.com for example.
#define RAW_DATA_ARRAY

// Shift the device's documented slave address (0x3C) for write operation
// 1 bit right.This compensates for how the TWI library only wants the
// 7 most significant bits (with the high bit padded with 0)

// calibrate YOUR compass, so compass raw x,y (,z) data is centered around 0,0,0 axis!
// To do this read do an XY scatter plot for 2D xy data, and just "read"
// work out or guess the offset to center the data (you need to rotate the compass to get lots of data pairs)
// for my compass the values where x=-100, y=-100 (did not work out z axis!)
const int x_offset = 0;
const int y_offset = 0;
const int z_offset = 0;