SAMD21 compatible library in place of Adafruit OV7670 library

Hi Everyone,

I am trying to create a project for a University class which uses the OV7670 camera to capture images.

I also need to save the image to an SD card and run it off a portable power supply, so after some research I selected the MKR Zero as it had an inbuild SD card slot and battery charger controller inbuild and initially seemed to have all the necessary IO pins I would need to run it.

With more digging after ordering and receiving the hardware I tried to use the Adafruit OV7670 library to run the camera. On the Arduino website here:
[Adafruit OV7670 - Arduino Reference] (Adafruit OV7670 - Arduino Reference)
It mentions the library should be compatible with most of the MKR boards including the Zero, however on the GitHub page for the library it states that it is only compatible for SAMD51 microcontrollers where the MKRZero uses a SAMD21 controller.

I am not familiar enough with reading source code and microcontroller definitions to between the 21 and 51 chips too know if they still work (which Im guessing is a no) or too modify the library myself.
I was wondering if there are updates for the library to work on the SAMD21 chip or if this is a hard lesson in learning to check the library's for their compatible microcontroller families.

any help and advice would be greatly appreciated.

Hi @jawright
There is a specific board handler library in Arduino IDE for SAMD -based Devices:
Arduino SAMD Boards (32-bits ARM Cortex-M0 +)

From what I understand that just allows the IDE to compile code for those microcontrollers no? I have that working already but my issue is the only libraries I have been able to find to control the OV7670 module are not compatible with the SAMD21 microcontroller

Damn it I understood your question the wrong way yesterday. I'll search deeper into the OV7670.

This is not the only use for these libraries, but anyway I was off-topic (fault is on me, that is my lesson for the day).

You are right, the library page on arduino website and the Github page do not agree with one another. That's a dumb question, but have you tried it anyway?

It looks like there is no other way to use the camera on the samd21. Try anyway and if this does not work then create an issue to see if this wakes up the project.

Sorry for the delayed reply. Thanks for your responses!

I am currently trying to dig through the libraries and understand some of the functions and where/how they assign which pins to use. So far its mostly going over my head but if I have no luck Ill flag the issue and see what happens.

Well, right away I see that the library allocates a HW2 buffer for the camera data. That's 150k+ for a 320x240 pixel image ("quarter VGA resolution"?)
Since the SAMD21 maxes out at 32k of RAM, it's not likely to be very satisfying...