Hello!
I am trying to develop a program in MATLAB that reads in data acquired from an MMA8451 accelerometer. The MMA8451 is connected to an Arduino Uno and the Uno is connected to MATLAB by USB. The MMA8451 is definitely functioning because I can run the demo code in the Arduino with no problems. If I move the MMA8451 around, the acceleration data will get displayed in real time in the Arduino interface.
I need to get this real time data into MATLAB though and this requires that I use the I2C protocol at a lower level of abstraction. I am wondering if anyone had any suggestions on moving forward with this.
Sincerely,
Stanley David
Hello David,
In this case I recommend taking a look at our Freedom Sensor Toolbox, it is designed to evaluate our accelerometers out of the box. You can use the FRDM-KL25Z to evaluate the on-board MMA8451Q device.
With its USB connectivity feature, you can interface the acceleration board with your PC thru USB and export the logged data to an Excel sheet, then you could process that data in Matlab.
I hope this information helps.
Regards,
David