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.
Revision 0:cbf763d04f7a, committed 2020-07-18
- Comitter:
- qaz
- Date:
- Sat Jul 18 11:55:05 2020 +0000
- Commit message:
- ic2
Changed in this revision
| 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/main.cpp Sat Jul 18 11:55:05 2020 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+I2C i2c(PTE0, PTE1);
+
+char read_sensor_lower_8bit( void )
+{
+ char v;
+ char cmd;
+
+ cmd = 0xA0;
+
+ i2c.write( 0xD0, &cmd, 1 );
+ i2c.read( 0xD0, &v, 1 );
+
+ return( v );
+}
+
+int main() {
+ printf("Got this: %d", read_sensor_lower_8bit());
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Jul 18 11:55:05 2020 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e7ca05fa8600 \ No newline at end of file