MLX90614 Basic Code

Dependencies:   MLX90614 mbed

Files at this revision

API Documentation at this revision

Comitter:
apatel43
Date:
Wed May 03 13:08:46 2017 +0000
Commit message:
MLX90614 Basic Code

Changed in this revision

MLX90614.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
diff -r 000000000000 -r 29adb7b2a6e3 MLX90614.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MLX90614.lib	Wed May 03 13:08:46 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/aquahika/code/MLX90614/#dcd4fe76bd13
diff -r 000000000000 -r 29adb7b2a6e3 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed May 03 13:08:46 2017 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+#include "mlx90614.h"
+
+I2C i2c(p28,p27);   //sda,scl
+MLX90614 thermometer(&i2c);
+Serial pc(USBTX,USBRX);
+float temp;
+
+int main()
+{
+    if(thermometer.getTemp(&temp)) {
+        pc.printf("Temperature : %f \r\n",temp);
+    }
+    wait(0.5);
+
+}
\ No newline at end of file
diff -r 000000000000 -r 29adb7b2a6e3 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed May 03 13:08:46 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file