ArduCAM / Arduino

This is ArduCAM library for Arduino boards
MIT License
468 stars 346 forks source link

Arducam Mega - Arduino MKR compatibility #579

Open Ernest-Paprec opened 10 months ago

Ernest-Paprec commented 10 months ago

Hello, I am trying to make communication between an Arducam Mega (model B0434) and an Arduino from the MKR family (the microcontroller for this family is the ATSAMD21G18A). Despite this family not beeing listed as supported by the library, I don't see what is preventing it from working.

I use the "ArduinoHal.h" platform (forced in the Platform.h file of the library). I confirmed the well working of the SPI bus using another SPI peripheral. The camera is working fine with an Arduino Uno. The version of the library I use is the 2.0.8, installed through Arduino IDE.

Here is the simple program used, based on the capture2SD example.

#include "Arducam_Mega.h"

const int CS = 7;

Arducam_Mega myCAM( CS );
void setup() {
    Serial.begin(115200);
    while(!Serial);
    Serial.println("Setup");
    myCAM.begin();
    Serial.println("Cam beginned");
    myCAM.takePicture(CAM_IMAGE_MODE_QVGA,CAM_IMAGE_PIX_FMT_JPG);
    Serial.println(myCam.getReceivedLength());
}

void loop() {}

Despite this, the program hangs at the myCAM.begin(); line. Could someone help me here?

Thanks a lot