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

error compiling for esp32 in arduino ide #15

Open
DansDesigns opened this issue Nov 11, 2023 · 2 comments
Open

error compiling for esp32 in arduino ide #15

DansDesigns opened this issue Nov 11, 2023 · 2 comments

Comments

@DansDesigns
Copy link

  • Arduino board: ESP32-WROOM-32

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.19

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): here is a log of the compilation error:
    C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp: In member function 'void Adafruit_HMC5883_Unified::read()': C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:112:60: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: Wire.requestFrom((byte)HMC5883_ADDRESS_MAG, (byte)6, true); ^ In file included from C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:38: C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:126:13: note: candidate 1: 'uint8_t TwoWire::requestFrom(int, int, int)' uint8_t requestFrom(int address, int size, int sendStop); ^~~~~~~~~~~ C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:122:12: note: candidate 2: 'size_t TwoWire::requestFrom(uint8_t, size_t, bool)' size_t requestFrom(uint8_t address, size_t len, bool stopBit); ^~~~~~~~~~~ C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:112:60: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: Wire.requestFrom((byte)HMC5883_ADDRESS_MAG, (byte)6, true); ^ In file included from C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:38: C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:126:13: note: candidate 1: 'uint8_t TwoWire::requestFrom(int, int, int)' uint8_t requestFrom(int address, int size, int sendStop); ^~~~~~~~~~~ C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:121:13: note: candidate 2: 'uint8_t TwoWire::requestFrom(uint16_t, uint8_t, uint8_t)' uint8_t requestFrom(uint16_t address, uint8_t size, uint8_t sendStop); ^~~~~~~~~~~ C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:112:60: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: Wire.requestFrom((byte)HMC5883_ADDRESS_MAG, (byte)6, true); ^ In file included from C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:38: C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:126:13: note: candidate 1: 'uint8_t TwoWire::requestFrom(int, int, int)' uint8_t requestFrom(int address, int size, int sendStop); ^~~~~~~~~~~ C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:120:13: note: candidate 2: 'uint8_t TwoWire::requestFrom(uint16_t, uint8_t, bool)' uint8_t requestFrom(uint16_t address, uint8_t size, bool sendStop); ^~~~~~~~~~~ C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:112:60: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: Wire.requestFrom((byte)HMC5883_ADDRESS_MAG, (byte)6, true); ^ In file included from C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:38: C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:126:13: note: candidate 1: 'uint8_t TwoWire::requestFrom(int, int, int)' uint8_t requestFrom(int address, int size, int sendStop); ^~~~~~~~~~~ C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:119:12: note: candidate 2: 'size_t TwoWire::requestFrom(uint16_t, size_t, bool)' size_t requestFrom(uint16_t address, size_t size, bool sendStop); ^~~~~~~~~~~ C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:112:60: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: Wire.requestFrom((byte)HMC5883_ADDRESS_MAG, (byte)6, true); ^ In file included from C:\Users\danda\OneDrive\Documents\Arduino\libraries\Adafruit_HMC5883_Unified-1.2.2\Adafruit_HMC5883_U.cpp:38: C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:126:13: note: candidate 1: 'uint8_t TwoWire::requestFrom(int, int, int)' uint8_t requestFrom(int address, int size, int sendStop); ^~~~~~~~~~~ C:\Users\danda\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\Wire\src/Wire.h:124:13: note: candidate 2: 'uint8_t TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)' uint8_t requestFrom(uint8_t address, uint8_t size, uint8_t sendStop); ^~~~~~~~~~~

@DansDesigns
Copy link
Author

added to main esp32 arduino issues

@david-nc
Copy link

david-nc commented Jan 7, 2024

The warning with requestFrom() is caused by passing a bool instead of a uint8_t as the third argument to the function.
Correction would be to change line 112 in Adafruit_HMC5883_U.cpp from
Wire.requestFrom((byte)HMC5883_ADDRESS_MAG, (byte)6, true);
to
Wire.requestFrom((byte)HMC5883_ADDRESS_MAG, (byte)6, (byte)true);

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