The errors I was getting from the compiler indicated that the compiler was unhappy with the type of variable I was passing to the Wire functions.
My code was calling the Wire.receive method as follows:
// request 1 byte from sensor
Wire.requestFrom( _addr, 1);
Where
_addr is defined as type
byte The resulting compiler error is:
R:\sketches\libraries\TC74\TC74.cpp: In member function 'int TC74::read()':
R:\sketches\libraries\TC74\TC74.cpp:49: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
C:\Arduino\libraries\Wire/Wire.h:54: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
C:\Arduino\libraries\Wire/Wire.h:53: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
However, if, when calling Wire.receive, I do a cast on the arguments passed
// request 1 byte from sensor
// Wire.requestFrom((int) _addr, (int) 1);
the sketch compiles correctly.
Is this a result of my poor coding or is this an aspect of the IDE 1.0 or am I just completely out to lunch. I welcome any comments or suggestions.