Advertisement
Erfinator

'TMP006_CFG_8SAMPLE' was not declared in this scope

Jan 4th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. uint8_t sensor1 = 0x40; // I2C address of TMP006, can be 0x40-0x47
  2. uint16_t samples = TMP006_CFG_8SAMPLE; // # of samples per reading, can be 1/2/4/8/16
  3. void setup()
  4. {
  5. Serial.begin(9600);
  6. Serial.println("TMP006 Example");
  7.  
  8. config_TMP006(sensor1, samples);
  9. }
  10. void loop()
  11. {
  12. float object_temp = readObjTempC(sensor1);
  13. Serial.print("Object Temperature: ");
  14. Serial.print(object_temp); Serial.println("*C");
  15.  
  16. float sensor_temp = readDieTempC(sensor1);
  17. Serial.print("Sensor Temperature: ");
  18. Serial.print(sensor_temp); Serial.println("*C");
  19.  
  20. delay(2000); // delay 1 second for every 4 samples per reading
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement