Tedd OKANO / Mbed 2 deprecated pca9547_Hello

Dependencies:   LM75B PCA9547 mbed

Files at this revision

API Documentation at this revision

Comitter:
okano
Date:
Mon Jun 30 23:57:31 2014 +0000
Child:
1:63d8f8d68f61
Commit message:
very first test code

Changed in this revision

LM75B.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LM75B.lib	Mon Jun 30 23:57:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/chris/code/LM75B/#6a70c9303bbe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jun 30 23:57:31 2014 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "LM75B.h"
+
+
+I2C     i2c( p28, p27 );
+
+void set_pca9547( char ch )
+{
+    char    v   = 0x08 | ch;
+    i2c.write( 0xE0, &v, 1 );
+}
+
+int main()
+{
+    set_pca9547( 0 );
+
+    LM75B   tmp0( p28, p27 );   //  making instance after a branch of I2C bus (which is connecting the LM75B) enabled
+
+    while(1) {
+        printf( "%.3f\r\n", tmp0.read() );
+        wait( 1.0 );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jun 30 23:57:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721
\ No newline at end of file