Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LM75B PCA9547 mbed
Revision 0:fb906b7b1452, committed 2014-06-30
- Comitter:
- okano
- Date:
- Mon Jun 30 23:57:31 2014 +0000
- Child:
- 1:63d8f8d68f61
- Commit message:
- very first test code
Changed in this revision
--- /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
PCA9547 8 channel I2C bus multiplexer