Hi,
I see in the hookup guide for the TMP102 sensor that there are a lot of configurations that can be applied. I was wondering if this sketch is sufficient and would print the temperature reading without any of the configurations?
#include <Wire.h> // library for I2C connection
#include <SparkFunTMP102.h> // library for temperature sensor
TMP102 sensor;
void setup() {
Serial.begin(115200);
while (!Serial);
Wire.begin();
if(!sensor.begin()) {
Serial.println("Cannot connect to TMP102.");
Serial.println("Is the board connected? Is the device ID correct?");
while(1);
}
Serial.println("Connected to TMP102!");
}
void loop() {
float temperature;
temperature = sensor.readTempF();
Serial.println(temperature);
delay(1000);
}