arduino-libraries / ArduinoECCX08

76 stars 49 forks source link

Compile error ECCX08RandomNumber.ino #3

Closed Skysurfer-14 closed 5 years ago

Skysurfer-14 commented 5 years ago

On compiling the example file in Platformio for Arduino UNO, I get an error:

C:\Users\user.platformio\lib\ArduinoECCX08_ID5570\src\ECCX08.cpp:622:80: error: call of overloaded 'requestFrom(uint8_t, size_t, bool)' is ambiguous

It seems, that changing the Line 622 of ECCX08.cpp to while (_wire->requestFrom((uint8_t)_address, (size_t)responseSize) != responseSize && retries--); solves the problem.

sandeepmistry commented 5 years ago

Hi @Skysurfer-14,

Could you please provide more details on you setup? Like which board you are targeting and full verbose output.

sandeepmistry commented 5 years ago

Sorry, I can reproduce it when the Uno is selected, I just saw your edited comment.

This library has only been tested on SAMD boards, like the Arduino MKR series.

sandeepmistry commented 5 years ago

Closing this as won't fix, based on the comment in https://github.com/arduino-libraries/ArduinoECCX08/issues/4#issuecomment-440718620.

gannaramu commented 2 years ago

@sandeepmistry any idea if this library can support Teensy4.0? I am having a similar issue:

lib\ArduinoECCX08\src\ECCX08.cpp: In member function 'int ECCX08Class::receiveResponse(void*, size_t)':
lib\ArduinoECCX08\src\ECCX08.cpp:724:80: error: call of overloaded 'requestFrom(uint8_t, size_t, bool)' is ambiguous
   while (_wire->requestFrom((uint8_t)_address, (size_t)responseSize, (bool)true) != responseSize && retries--);
                                                                                ^
In file included from C:\Users\ganna\.platformio\packages\framework-arduinoteensy\libraries\Wire/Wire.h:26:0,
                 from lib\ArduinoECCX08\src\ECCX08.h:24,
                 from lib\ArduinoECCX08\src\ECCX08.cpp:22:
C:\Users\ganna\.platformio\packages\framework-arduinoteensy\libraries\Wire/WireIMXRT.h:90:10: note: candidate: uint8_t TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)
  uint8_t requestFrom(uint8_t address, uint8_t quantity, uint8_t sendStop);
          ^
C:\Users\ganna\.platformio\packages\framework-arduinoteensy\libraries\Wire/WireIMXRT.h:94:10: note: candidate: uint8_t TwoWire::requestFrom(int, int, 
int)
  uint8_t requestFrom(int address, int quantity, int sendStop) {