test

Dependencies:   mbed MMA8452Q

Fork of HelloWorld by Simon Ford

Revision:
8:bb27936d2358
Parent:
7:32229ffff57e
Child:
9:f36f1506a840
--- a/main.cpp	Wed Aug 30 19:58:18 2017 +0000
+++ b/main.cpp	Wed Aug 30 20:01:44 2017 +0000
@@ -8,10 +8,10 @@
 int main() {
     
     comI2C.start();
-    comI2C.write(0x3A);  // A write to device 0x1D
+    comI2C.write(0x1D);  // A write to device
     comI2C.write(0x06); // Register to read from (acceleration in X)
     comI2C.start();        // Need to send start condition here
-    comI2C.write(0x3B); // Read from device 0x1D
+    comI2C.write(0x1D); // tell devide you want to read
     int c=comI2C.read(0);      // Read the data with NACK
     comI2C.stop();
     pc.printf("degree : %d", c);