TinyCircuits

RTIMULib: SERIAL redefined?

RTIMULib: SERIAL redefined?
« on: August 10, 2016, 09:39:48 PM »
Hi,
I'm trying the 9-axis IMU shield with the RTIMULib example downloaded from your website.
It seems this code won't compile:

#ifdef SERIAL_PORT_MONITOR
  #define SERIAL SERIAL_PORT_MONITOR
#else
  #define SERIAL Serial
#endif

The error is:

TinyShield_9_Axis_Sensorboard.ino:58:0: warning: "SERIAL" redefined

Arduino.h:54:0: note: this is the location of the previous definition
 #define SERIAL  0x0


Looks like the symbol has been defined in Arduino.h. Can some one explain what the problem is and how to solve it?

Thanks!

Re: RTIMULib: SERIAL redefined?
« Reply #1 on: August 15, 2016, 06:19:40 PM »
I'm not sure how this was building before and why it's not now, because 'SERIAL' seems to have always been defined in Arduino.h, but I've updated the codebender sketches with instances of 'SERIAL' in the example simply replaced with 'SerialMonitor' which should not be defined anywhere else- should be able to redownload working code.

Re: RTIMULib: SERIAL redefined?
« Reply #2 on: August 22, 2016, 03:08:20 PM »
It works now. Thanks.