Hello code for "Switch Science mbed LPC824"

Dependencies:   mbed

Fork of SwitchSciencembedLPC824_test by Mako SHIMURA

Files at this revision

API Documentation at this revision

Comitter:
okano
Date:
Mon Nov 03 00:26:12 2014 +0000
Parent:
5:a1251609ee7f
Parent:
4:e79412c7b599
Child:
7:553960b756ed
Commit message:
two constructors version

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
test_LM75B.lib Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Nov 03 00:22:45 2014 +0000
+++ b/main.cpp	Mon Nov 03 00:26:12 2014 +0000
@@ -1,15 +1,24 @@
 #include "mbed.h"
 #include "test_LM75B.h"
 
-test_LM75B  temp( p28, p27 );
+test_LM75B  temp0( p28, p27 );
+
+I2C         i2c( p28, p27 );
+test_LM75B  temp1( i2c );
+
 
 int main()
 {
-    float   t;
+    float   t0;
+    float   t1;
+
+    i2c.frequency( 400 * 1000 );
 
     while(1) {
-        t   = temp;
-        printf( "temp = %7.3f\r\n", t );
+        t0   = temp0;
+        t1   = temp1;
+        printf( "temp = %7.3f, %7.3f\r\n", t0, t1 );
         wait( 1 );
     }
 }
+
--- a/test_LM75B.lib	Mon Nov 03 00:22:45 2014 +0000
+++ b/test_LM75B.lib	Mon Nov 03 00:26:12 2014 +0000
@@ -1,1 +1,1 @@
-test_LM75B#c372135e7d0c
+test_LM75B#863659ef0231