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

Devantech/TPA81.h

Devantech thermal array.
tpa81.jpg
This must be connected to the I2C bus and a 5V power source. Note that we do not use the in-built servo driver.
It may be defined using:
Devantech_TPA81 tpa = MAKE_Devantech_TPA81();
If you have changed the I2C address of the device from the default value of 0xD0 to, say, 0xD4 then you will need to use:
Devantech_TPA81 tpa = MAKE_Devantech_TPA81_At(0xD4);
The sensor should be initialised in appInitHardware using:-
temperatureInit(tpa);
The sensor can then be read using:-
temperatureRead(tpa);
and then the ambient temperature will be in tpa.temperature.celsius
The device also returns 8 individual values which are available in tpa.sensor[0] to tpa.sensor[7]

Valid XHTML 1.0 Transitional