title: How to read MMA8542q Accelerometer sensor in Matlab using Raspberry
body: <p>I need help please, I try to read the position [x,y,z ] in matlab, here is my code, </p>
  
  <p>enter code here</p>
  
  <pre><code>mypi = raspi;
  scanI2CBus(mypi,'i2c-1');
  myi2c = i2cdev(mypi,'i2c-1','0x1D');
  output-1 = read(myi2c, 8)
  </code></pre>
  
  <p>In my code I have this output</p>
  
  <pre><code>enter code here
  0  13  248  84  252  254  64  0
  </code></pre>
  
  <p><strong>My problem here</strong> is all values will be the same even if I change the position of the sensor.(All time the same values).
   <strong>How I can get the position [x,y,z],my sensor is MMA8542q.</strong></p>
  
  <p>Thank you! </p>