Hello, I am currently using a wifi rev 2 to get data from the sensirion SCD30 sensor. I installed the sensirion I2C SCD30 library and tried the example but when I upload, I get this error message:
In file included from c:\Users\erocn\OneDrive\Documents\Arduino\libraries\Sensirion_Core\src\SensirionI2CCommunication.h:38:0,
from c:\Users\erocn\OneDrive\Documents\Arduino\libraries\Sensirion_Core\src\SensirionI2CCommunication.cpp:31:
C:\Users\erocn\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\libraries\Wire\src/Wire.h: In static member function 'static uint16_t SensirionI2CCommunication::receiveFrame(uint8_t, size_t, SensirionI2CRxFrame&, TwoWire&, CrcPolynomial)':
C:\Users\erocn\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\libraries\Wire\src/Wire.h:64:12: note: candidate 1: size_t TwoWire::requestFrom(int, int, int)
size_t requestFrom(int, int, int);
^~~~~~~~~~~
C:\Users\erocn\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\libraries\Wire\src/Wire.h:62:12: note: candidate 2: virtual size_t TwoWire::requestFrom(uint8_t, size_t, bool)
size_t requestFrom(uint8_t, size_t, bool);
^~~~~~~~~~~
I think there is a library issue but I really don't know how to solve the problem. I hope someone could help me, thank you!
Thank you so much it worked! But could you explain me the problem more detailed please? I would like to understand because I have another problem with another sensor, maybe it would help me!
In most available platforms the requestFrom() method of the Wire library is overloaded, which means that there are several version of that method that differs only in the parameter list. The compiler tries to find the correct version to call by comparing the list of parameters provided against the different version of the method in the library. If it doesn't find a perfect match it tries all versions that might match using the standard casts it knows. In your case a perfect match (where all parameters have the correct type) wasn't available and using standard casts there were multiple matches on the same level. In such situations the compiler errors out and let programmer specify which version to use. That's what we did by casting to types that make a perfect match.