Rohm ml8511 hello world application
Dependencies: mbed
Fork of BD1020HFV_Hello by
Revision 0:ee7b9cc966d7, committed 2016-01-06
- Comitter:
- MACRUM
- Date:
- Wed Jan 06 01:16:14 2016 +0000
- Child:
- 1:ba7e525074f9
- Commit message:
- Initial commit
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 Wed Jan 06 01:16:14 2016 +0000
@@ -0,0 +1,14 @@
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX);
+AnalogIn sensor(A2);
+
+int main() {
+ float temparature;
+ pc.printf("\nBD1020HFV Temperature sensor test program.\n");
+ while(1) {
+ temparature = -(1000 * (sensor * 3.3f) - 1546) / 8.2;
+ pc.printf("Temperature=%5.3f\n", temparature);
+ wait(0.4);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jan 06 01:16:14 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c \ No newline at end of file
