Arduino
Arduino copied to clipboard
SPI Interface Error
Hi,
I'm having the exact same error "SPI Interface Error" as https://github.com/ArduCAM/Arduino/issues/141
Please find my circuit and code setup:

Kindly help.
I have found that adding some delay statements in the setup seems to help with the SPI errors. I have used two delay(3000). This seems to help on startup. yield() statements may also be useful.
Thank you @BDCowboy, I shall try that and get back to you asap.
@prasuchit The Mega 2560 board's SPI signal should be connect to ICSP .
@UCTRONICS , can you please elaborate on that? Are you talking about a connection on the board or something in the program?
@prasuchit
Please refer to this schematic diagram
You should connect the SPI signal to here .
Ok, I figured it out, for anyone who is having this trouble in the future:
(This was done with Arduino Mega, but I guess the principle is the same for all boards)
Connect Vcc and Ground of the arducam board to the +5V and Ground on arduino. The CS pin from the arducam board to any digital pin on arduino and look for "const int SPI_CS = 49;" in the code that you are running and change that to that pin number. The rest of the pins, refer to the image:

This worked for me after searching for a really long time. I don't know why arducam wouldn't have a diagram for mega. This worked for me with the 2MP Plus using MEGA
Thanks for your great suggestions. We will update our diagram for mega as soon as possible.
Hello, Arducam has update document and add diagram for mega2560+ Arducam MINI Camera https://www.arducam.com/docs/spi-cameras-for-arduino/hardware-connection-for-mega2560/