library mma8452

Dependents:   APP3_Capteur_V2

Fork of MMA8452 by Ashley Mills

Revision:
4:27aa3cd43234
Parent:
3:ffb0b1650ca2
Child:
5:b3d0abd97e55
--- a/MMA8452.cpp	Wed Oct 16 14:11:04 2013 +0000
+++ b/MMA8452.cpp	Wed Oct 16 16:26:26 2013 +0000
@@ -290,10 +290,11 @@
     
     if(m_i2c.write(mcu_address,zaxis_register,1) == 0)
     {
-        if(m_i2c.read(mcu_address,zaxis_buffer,2) == 0)
+        //if(m_i2c.read(mcu_address,zaxis_buffer,2) == 0)
+        if(m_i2c.read(mcu_address,zaxis,2) == 0)
         {
             //strcpy(yaxis, yaxis_buffer);
-            memcpy(zaxis, zaxis_buffer, 2);
+            //memcpy(zaxis, zaxis_buffer, 2);
             //yaxis[0] = 0x00;                        // make sure the array is set to zero
             //yaxis[1] = 0x00;
             //s = *reinterpret_cast<short*>(&xaxis);