mCube Accelerometer sensor Error

Hi All,

I have received this code from one of the FAE’s from this company (mcube) and when I ran this code, it complies and there is no issues even when I even upload this to the arduino Mega 2560. When I start the Serial monitor I don’t see the Accelerometer numbers getting displayed on the screen, I see bunch of (-1,-1,-1). He originally wrote this SPI code since I wanted to install 10 of these Accelerometer to my arduino mega 2560 board at the same time (the code only contains 2 devices but that could easily get modified to 10 sensors). I looked at the SPI signal through my digital oscilloscope and it seems that they are sending a command but there is nothing getting displayed on the serial command of my computer. they even checked my arduino (converted the i/o voltage to 3. something volts)and my PCB and said it worked on there side. Can anyone come up with a better example code for 10 mcube sensors? I have attached the files and the data sheet of the part below. Any help in this matter will be deeply appreciated.

Thank you.

Data sheet:

MC3630.cpp (9.28 KB)

MC3630.h (7.43 KB)

test_spi.ino (672 Bytes)

I have received this code from one of the FAE's from this company (

Yeah, we know, you told us the same thing in the other two identical posts on this subject.

DO NOT CROSS-POST, CROSS-POSTING WASTES TIME.

Duplicates deleted.