bluerobotics / bluerobotics/BlueRobotics_MS5837_Library

Library does not compile for certain newer Arduino targets

Open
#20 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
74
Forks
70
PR merge metrics
No merged PRs in 30d

Description

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.
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.