Reg : MMA8451

I've Recently bought a MMA8451 accelerometer from NEXROBOTICS . I am doing a 'Self-Balancing' bot and i want to interface my accelerometer with the Arduino Uno . The datasheet of MMA8451 is too tedious and i don't know where to start . Communication is through I2C .
Any startup code or guidance would be helpful .
Thank you.

MMA8451Q.pdf (456 KB)

Hello, friend

I'm right now writing a driver to communicate with the MMA8451 module;

It will be available soon on my repository on GitHub - dalmirdasilva/ArduinoAccelerometerDriver: Accelerometer driver for Arduino.

I hope I can finish it this week!

Thank you in advance.. :slight_smile:

Hello, friend

As I said, I was working on a driver for this sensor.

I's really complex to get all those datasheet on mind to write the code, but I'm trying! :slight_smile:

I got into a complication: The sensor works using 3.3V , it's not a problem, except for the i2c interface which also uses 3.3V. To work it around I bought a Logic Level Converter device that safely steps down 5V signals to 3.3V and steps up 3.3V to 5V. (It is cheap, about $1.95, I'm no sure if I can write here the site where I bought it)

I'm still waiting for it to arrive, BUT I put a preliminary version of the library on my repository (GitHub - dalmirdasilva/ArduinoAccelerometerDriver: Accelerometer driver for Arduino.).

Be careful, I didn't test it :slight_smile: It has a few useful methods do configure and read the data. It does not deal with the FIFO yet.

Anyway, you can get it there and maybe help me to improve it.

Best Regards!

Hi,

I do not know if you still want the driver. If yes, it is ready to test.

BR