9 Axis Motion Shield - Arduino Due

Hi,

I have been using my 9 axis motion shield on my Uno without any problems. When I tried to get it to work on a Due the compiler stopped with the error below. I am new to the Arduino so any help is appreciated. (standard example Euler.ino software)

Arduino: 1.8.2 (Windows 10), Board: "Arduino Due (Programming Port)"

C:\Users\Marcus\Documents\Arduino\libraries\Nine_axes_motion_master\src\NineAxesMotion.cpp:1003:55: error: default argument given for parameter 1 of 'void NineAxesMotion::begin(unsigned int)' [-fpermissive]

void NineAxesMotion::begin(unsigned int address = 0x28)

^

In file included from C:\Users\Marcus\Documents\Arduino\libraries\Nine_axes_motion_master\src\NineAxesMotion.cpp:54:0:

C:\Users\Marcus\Documents\Arduino\libraries\Nine_axes_motion_master\src\NineAxesMotion.h:713:7: error: after previous specification in 'void NineAxesMotion::begin(unsigned int)' [-fpermissive]

void begin(unsigned int address = 0x28);

^

exit status 1
Error compiling for board Arduino Due (Programming Port).

Try the Arduino Due sub-forum.

There are several issues with the Due I2C library right now, and there are subtle hardware differences between the Due and the UNO (extra caps and resistors may be needed, Due does not do I2C clock-stretching, etc.)

Thanks -dev, is there any way to search within the Forum sub-forums?

marcustuck:
is there any way to search within the Forum sub-forums?

It looks like they have disabled the Forum search function and simply re-direct you to a google search. I can't tell you how weird it is to type "search" in the Search box... :confused:

Then I wondered if the header at the top of the page could be used, so I tried entering this in the Search box:

    search "Website and Forum"

... hoping that it would return posts about searching from the "Website and Forum" sub-forum. The first result is this thread. So, just enter this in the Search box:

    MPU9050 "Products >  Arduino Due"

Those double-quotes are required.

Cheers,
/dev

Thanks

As I said above I’m new to this and am no IT expert! However, this is how I fixed the issue: In the NineAxesMotion.cpp I made the following changes.

void NineAxesMotion::begin(unsigned int x) // was unsigned int address = 0x28
{
initSensor(0x28); // was address
begin(9600); // added this
}

Hope it helps others!

Thank you @marcustuck, that did the trick :slight_smile: