I just bought this sensor: High Precision Temperature Sensor - TMP117 (Qwiic) SPX-15413
using WIN 10 arduino v1.8.5, board=uno, installed the TMP117 library 1.0.0
getting a lot of compiler error messages:
thanks
Moderator edit to add formatting.
C:\data\ArduinoSourceCode\SparkfunQwiicTempTMP117\SparkfunQwiicTempTMP117.ino: In function 'void loop()':
SparkfunQwiicTempTMP117:75: error: call of overloaded 'print(const char [27], double)' is ambiguous
Serial.print("Temperature in Celsius: %d", sensor.readTempC());
^
C:\data\ArduinoSourceCode\SparkfunQwiicTempTMP117\SparkfunQwiicTempTMP117.ino:75:66: note: candidates are:
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:232,
from sketch\SparkfunQwiicTempTMP117.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: size_t Print::print(unsigned char, int) <near match>
size_t print(unsigned char, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: no known conversion for argument 1 from 'const char [27]' to 'unsigned char'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: size_t Print::print(int, int) <near match>
size_t print(int, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: no known conversion for argument 1 from 'const char [27]' to 'int'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: size_t Print::print(unsigned int, int) <near match>
size_t print(unsigned int, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: no known conversion for argument 1 from 'const char [27]' to 'unsigned int'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: size_t Print::print(long int, int) <near match>
size_t print(long, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: no known conversion for argument 1 from 'const char [27]' to 'long int'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: size_t Print::print(long unsigned int, int) <near match>
size_t print(unsigned long, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: no known conversion for argument 1 from 'const char [27]' to 'long unsigned int'
SparkfunQwiicTempTMP117:77: error: call of overloaded 'print(const char [30], double)' is ambiguous
Serial.print("Temperature in Fahrenheit: %d", sensor.readTempF());
^
C:\data\ArduinoSourceCode\SparkfunQwiicTempTMP117\SparkfunQwiicTempTMP117.ino:77:69: note: candidates are:
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:232,
from sketch\SparkfunQwiicTempTMP117.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: size_t Print::print(unsigned char, int) <near match>
size_t print(unsigned char, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:69:12: note: no known conversion for argument 1 from 'const char [30]' to 'unsigned char'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: size_t Print::print(int, int) <near match>
size_t print(int, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:70:12: note: no known conversion for argument 1 from 'const char [30]' to 'int'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: size_t Print::print(unsigned int, int) <near match>
size_t print(unsigned int, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:71:12: note: no known conversion for argument 1 from 'const char [30]' to 'unsigned int'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: size_t Print::print(long int, int) <near match>
size_t print(long, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:72:12: note: no known conversion for argument 1 from 'const char [30]' to 'long int'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: size_t Print::print(long unsigned int, int) <near match>
size_t print(unsigned long, int = DEC);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:73:12: note: no known conversion for argument 1 from 'const char [30]' to 'long unsigned int'
SparkfunQwiicTempTMP117:82: error: 'class TMP117' has no member named 'setConversionMode'
sensor.setConversionMode(3);
^
exit status 1
call of overloaded 'print(const char [27], double)' is ambiguous