A test utility for mma8452

Dependencies:   MMA8452 mbed

Revision:
6:94d7ca596f52
Parent:
5:34fa5db89a3a
--- a/main.cpp	Wed Oct 16 16:26:39 2013 +0000
+++ b/main.cpp	Wed Oct 16 18:55:48 2013 +0000
@@ -54,6 +54,22 @@
     {
         pc.printf("\nFailed to get the device status. The id is set as: 0x%x ", deviceStatus);
     }
+    
+    
+    int ControlRegister(0);
+    if (accelerometer.get_CTRL_Reg1(ControlRegister)==0)
+    {
+        pc.printf("\nGot contents of Control Register1 which is: 0x%x \n", ControlRegister);
+        
+    
+    }
+    else
+    {
+        pc.printf("\nFailed to get the device status. The id is set as: 0x%x ", deviceStatus);
+    }
+    
+      
+    wait(5);
         
     for (int i=0;i<=50;i++)
         {