Updating to Arduino 1.0 APIs and improvements

Last updated on Mon, 2011-12-19 12:33. Originally submitted by fabio on 2011-12-05 18:01.

As you may have heard, the Arduino team just released the version 1.0 of their IDE which comes with quite some changes in the programming APIs. So, I spent some time updating all my Arduino libraries to be used with Arduino 1.0.

From now on, I consider previous versions of the IDE/API no more supported. So, if you are using my libraries, you are strongly suggested to update to Arduino 1.0 and the most recent version of my libraries.

Here are the new versions with the changes made:

  • HMC58X3 library: updated to Arduino 1.0 with a better calibration.
  • MS5611-01BA: better reading functions which cache the results when the sensor can't provide a newer reading, update to Arduino 1.0.
  • FreeIMU library: updated to Arduino 1.0 and to the new algorithm by Sebastian.

Enjoy it!

UPDATE 2011-12-07: The Arduino 1.0 API has a bug in the Wire implementation which throws an error on compiling: call of overloaded 'write(int)' is ambiguous. In order to fix it, search Wire.h within your Arduino install and add the following lines:

inline size_t write(unsigned long n) { return write((uint8_t)n); }
inline size_t write(long n) { return write((uint8_t)n); }
inline size_t write(unsigned int n) { return write((uint8_t)n); }
inline size_t write(int n) { return write((uint8_t)n); }

Your Wire.h will look like this. See the bug report for all the details.