"Basic with Callbacks" example.
Works fine for Nano, but fails on the Arduino Mega 2560 - it can't compile the sketch
Build options changed, rebuilding all
In file included from /Users/redacted/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/avr/include/avr/iom2560.h:38:0,
from /Users/redacted/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/avr/include/avr/io.h:174,
from /Users/redacted/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/avr/include/avr/pgmspace.h:90,
from /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h:28,
from /Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:19,
from /Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/I2CNavKey.cpp:15:
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:101:3: error: expected identifier before numeric constant
INT2 = 0x8000,
^
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:101:3: error: expected '}' before numeric constant
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:101:3: error: expected unqualified-id before numeric constant
In file included from /Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/I2CNavKey.cpp:15:0:
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:182:20: error: expected ')' before 'add'
i2cNavKey(uint8_t add);
^
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:196:18: error: 'Int_Status' was not declared in this scope
bool readStatus(Int_Status s);
^
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:197:26: error: 'uint16_t readStatus()' redeclared as different kind of symbol
uint16_t readStatus(void);
^
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:196:7: note: previous declaration 'bool readStatus'
bool readStatus(Int_Status s);
^
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:275:1: error: expected unqualified-id before 'private'
private:
^
/Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib/src/i2cNavKey.h:292:1: error: expected declaration before '}' token
};
^
Multiple libraries were found for "i2cEncoderLibV2.h"
Used: /Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib
Not used: /Users/redacted/Documents/Arduino/libraries/ArduinoDuPPaLib-1.2.0
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
Though the problem seems to be specifically about the NavKey which I'm not using.
If I delete I2CNavKey.h and I2CNavKey.cpp from the folder in my library, then it DOES work
I guess that should actually make this an issue for I2CNavKey and not this, however I will leave this here, since they are a "combined" library and others may not realise
"Basic with Callbacks" example.
Works fine for Nano, but fails on the Arduino Mega 2560 - it can't compile the sketch
Though the problem seems to be specifically about the NavKey which I'm not using.
If I delete I2CNavKey.h and I2CNavKey.cpp from the folder in my library, then it DOES work
I guess that should actually make this an issue for I2CNavKey and not this, however I will leave this here, since they are a "combined" library and others may not realise