TinyCircuits Forum

TinyCircuits Products => TinyDuino Processors & TinyShields => Topic started by: gnahzc on August 10, 2016, 09:39:48 PM

Title: RTIMULib: SERIAL redefined?
Post by: gnahzc 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!
Title: Re: RTIMULib: SERIAL redefined?
Post by: Ben Rose 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.
Title: Re: RTIMULib: SERIAL redefined?
Post by: gnahzc on August 22, 2016, 03:08:20 PM
It works now. Thanks.