Revision:
0:bd1c02c7bc8a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TPA81.cpp	Tue Aug 02 15:21:04 2011 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "TPA81.h"
+
+
+
+TPA81::TPA81(PinName mysda, PinName myscl): _TPA(mysda,myscl) {
+    _delay = 51;
+    _addr = 0xD0;
+}
+
+void TPA81::setAddress(char inAddr) {
+
+}
+
+int TPA81::getTempAt() {
+    _cmd[0] = 1;
+    _cmd[1] = 1;
+
+    _TPA.write(_addr, _cmd, 2);
+    _TPA.read(_addr, _cmd, 1);
+
+    return _cmd[0];
+}
+
+int TPA81::getTemp(short i) {
+    _cmd[0] = i;
+    _cmd[1] = i;
+
+    _TPA.write(_addr, _cmd, 2);
+    _TPA.read(_addr, _cmd, 1);
+
+    return _cmd[0];
+}
\ No newline at end of file