works fine on STM

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
open4416
Date:
Wed Feb 15 11:35:37 2017 +0000
Parent:
2:09b8571eb8ce
Commit message:
bug in Buff high byte

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Feb 13 12:01:31 2017 +0000
+++ b/main.cpp	Wed Feb 15 11:35:37 2017 +0000
@@ -32,7 +32,7 @@
     data_write[0] = MLX90614_TOBJ;      //TOBJ address to buff
     i2c.write( MLX90614_ADDR<<1 | 0x00, data_write, 1, 1);  //command to RAM access SR activated
     i2c.read ( MLX90614_ADDR<<1 | 0x01, data_read , 3, 0);  //read callback
-    Buff |=  data_read[1] << 8;         // merging
+    Buff  =  data_read[1] << 8;         // merging
     Buff |=  data_read[0];
     led = 0;
 }
\ No newline at end of file