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

Fix compiler errors when compiling for Arduino Nano 33 BLE platform #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NeilBaner
Copy link

My fix for #20.

I renamed a couple of variables D1 and D2 as they were causing a conflict with certain Arduino headers for the Nano 33 BLE. I also added a cast-to-integer in some of the calls to Wire::write, as the new mbed-based implementation of Wire.h provides two candidates, write(uint8_t) and write(char*).

I tried my best to make sure this code doesn't break anything else. I tried compiling for a few different Arduino platforms, including: Arduino Uno, Arduino Nano, Arduino Nano 33 BLE, Arduino Nano Every, Arduino Portenta H7, and Arduino Nano 33 IOT, and the library compiled without any issues. I apologise for not knowing the proper procedure to test my code thoroughly, I am a student and very new to this.

Rename the variables `D1` and `D2` to `D1_pres` and `D2_temp` to prevent conflict with `pins_arduino.h` when compiling for certain Arduino boards.
Add a cast to integer to prevent "ambiguous call" error
@NeilBaner
Copy link
Author

I apologise for not knowing the proper procedure to test my code thoroughly, I am a student and very new to this.

I notice there's a CI check which does pass, so I guess that's good?

PaulZC added a commit to sparkfunX/BlueRobotics_MS5837_Library that referenced this pull request Jan 27, 2021
PaulZC added a commit to sparkfunX/BlueRobotics_MS5837_Library that referenced this pull request Jan 27, 2021
patrickelectric pushed a commit that referenced this pull request Mar 3, 2021
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

Successfully merging this pull request may close these issues.

1 participant