Arduino library for Texas Instruments TMP126 Temperature Sensor
Note
Basic functions implemented just to deal with VC2000 OCXO project
TMP126: CS, SI (MOSI), SO (MISO) and SCLK must be declared
begin: initializes device with default configuration, unless custom one it's passed through its argument in HEX formatDefault (0x0081):- Interrupt mode
- Continuous conversion mode
- Averaging enable
- 31.25 ms (32 Hz) conversion period
write: writes a 16-bit word to a single registerread: reads a 16-bit word from a single registerconfig: writes a custom 16-bit configuration word to Configuration RegistergetStatus: returns bool '0' if device does not respond or '1' if it doesgetTemp: returns temperature (float) in CelsiusgetID1: returns 16-bit Unique ID1 valuegetID2: returns 16-bit Unique ID2 valuegetID3: returns 16-bit Unique ID3 valuegetDevID: returns 16-bit Device IDreset: resets device and returns bool '0' if device does not respond or '1' if it does