Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library does not compile for certain newer Arduino targets #20

Open
NeilBaner opened this issue Dec 31, 2020 · 1 comment
Open

Library does not compile for certain newer Arduino targets #20

NeilBaner opened this issue Dec 31, 2020 · 1 comment

Comments

@NeilBaner
Copy link

When I include the library in Arduino IDE, and compile for the Arduino Nano 33 BLE/BLE Sense boards, I get some errors due to D1 and D2 being #define-d in pins_arduino.h, from the built-in Arduino libraries, causing a conflict with the D1 and D2 variables declared in the library.

The exact error is as follows:

In file included from C:\Users\neilbaner\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.0\cores\arduino/Arduino.h:90:0,
                 from sketch\MS5837_Example.ino.cpp:1:
C:\Users\neilbaner\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.0\variants\ARDUINO_NANO33BLE/pins_arduino.h:82:14: error: expected unqualified-id before numeric constant
 #define D1   1
              ^
C:\Users\neilbaner\Documents\Arduino\libraries\BlueRobotics_MS5837_Library/MS5837.h:88:11: note: in expansion of macro 'D1'
  uint32_t D1, D2;
           ^
exit status 1
Error compiling for board Arduino Nano 33 BLE.
@Subseaking
Copy link

Had the exact same issue on Portenta H7 - applied the changes suggested by @NeilBaner for merge and the code compiles now. Physical testing of sensor remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants