Hello, I am trying to connect an arduino nano to a mma8451 accelerometer this week. However, it stopped after I uploaded the official example (maybe stopped at recognizing the sensor). This example successfully functioned last year. I have swapped different boards, wires, sensors, and pins. Does anyone know what might cause this happen? Or is there anyway I can test the functionality of the sensor?
In this library .cpp, this line (84) will stop everything if it equals 1.
while (readRegister8(MMA8451_REG_CTRL_REG2) & 0x40)
;
The datasheet says MMA8451_REG_CTRL_REG2
does not exist, but CTRL_REG2
does, and further says:
Modification of this register’s contents can only occur when device is STANDBY mode except CTRL_REG1 ACTIVE bit and CTRL_REG2 RST bit.
Whatever that means. Maybe your have an out-dated library or sketch?
Maybe, inside a copy of the .cpp, you can print the contents of the ...REG2?
Maybe soldering the header pins to the sensor module will help.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.