WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

TPA81 Thermal Array

Devantech thermal array.
tpa81.jpg
This must be connected to the I2C bus and a 5V power source. Note that this library does not support the in-built servo driver.
Note
The getCelsius() function will return the ambient temperature but you can access each of the individual sensor readings using the function getSensorCelsius().
Example
Assuming you have called the device 'myTPA81' in Project Designer then you can use the sensor as follows:-
// Read the device and store values
myTPA81.read();
 
// Output the ambient temperature
TEMPERATURE_TYPE ambientC = myTPA81.getCelsius();
TEMPERATURE_TYPE ambientF = Temperature::toFahrenheit(ambientC);
cout << "Ambient: " << ambientC << "C " << ambientF << "F\n";
  
// Output each individual reading
for(int inx = 0; inx < 8 ; inx++){
    cout << "Sensor " << inx << "=" << myTPA81.getSensorCelsius(inx) + '\n';
}
Function Summary

Valid XHTML 1.0 Transitional