RTIMULib: SERIAL redefined?

gnahzc · 3 · 3347

gnahzc

  • Newbie
  • *
    • Posts: 4
    • View Profile
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!


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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.



 

SMF spam blocked by CleanTalk