Test Program for SoftwareI2C, Gets Calibration data from BMP085

Dependencies:   mbed SoftwareI2C

Revision:
0:aedfc88731e2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Apr 01 22:54:21 2012 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "SoftwareI2C.h"
+
+#define BMP085_ADDRESS 0xee
+
+Serial debug(USBTX, USBRX);
+
+SoftwareI2C::SoftwareI2C i2c_device(p18, p17);
+
+int main() {
+    debug.baud(115200);
+    debug.printf("AC1 = %d\r\n", (short)i2c_device.read16(BMP085_ADDRESS, 0xaa));
+    debug.printf("AC2 = %d\r\n", (short)i2c_device.read16(BMP085_ADDRESS, 0xac));
+    debug.printf("AC3 = %d\r\n", (short)i2c_device.read16(BMP085_ADDRESS, 0xae));
+    debug.printf("AC4 = %d\r\n", i2c_device.read16(BMP085_ADDRESS, 0xb0));
+    debug.printf("AC5 = %d\r\n", i2c_device.read16(BMP085_ADDRESS, 0xb2));
+    debug.printf("AC6 = %d\r\n", i2c_device.read16(BMP085_ADDRESS, 0xb4));
+    debug.printf("B1 = %d\r\n", (short)i2c_device.read16(BMP085_ADDRESS, 0xb6));
+    debug.printf("B2 = %d\r\n", (short)i2c_device.read16(BMP085_ADDRESS, 0xb8));
+    debug.printf("MB = %d\r\n", (short)i2c_device.read16(BMP085_ADDRESS, 0xba));
+    debug.printf("MC = %d\r\n", (short)i2c_device.read16(BMP085_ADDRESS, 0xbc));
+    debug.printf("MD = %d\r\n", (short)i2c_device.read16(BMP085_ADDRESS, 0xbe));
+    
+    while(1) {
+
+    }
+}