Go Down

Topic: Due - 9 Axis Motion Shield (Read 82 times) previous topic - next topic



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).


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!

Go Up