arduino-libraries / Arduino_OV767X

Official OV767X Library for Arduino , currently supports OV7670 and OV7675 cameras
https://www.arduino.cc/reference/en/libraries/arduino_ov767x/
GNU General Public License v2.0
68 stars 25 forks source link

Camera failing to initialize on nano 33 ble. Compiler warning suggests the Nano 33 ble has changed? #18

Closed JAWRobot closed 2 years ago

JAWRobot commented 3 years ago

Hi I'm struggling to get the camera to initialize on the nano 33 ble. The same one mentioned in all of the examples.

Ive double checked all my wiring and also tried using both variations of the library. still no luck.

In both cases though the compiler throws this warning when I upload the script:

WARNING: library Arduino_OV767X claims to run on mbed architecture(s) and may be incompatible with your current board which runs on mbed_nano architecture(s).

But as far as I'm aware this is the same board? Was there a change in the definition for the chip on this board or has the chip itself changed for the 33 ble?? Googling has not been able to find me an answer but I might just be searching the wrong thing. Any help would be great.

Please let me know if I'm beening stupid and if this is an issue more appropriate for the arduino forums

Edit: Sorry I should probably add that it seems to be failing whenever the Camera.begin() function is called. Is there a version of the code that indicates exactly where it is failing? If not ill try my hand at modifying my local version to tell me.

Thanks again.

per1234 commented 3 years ago

Hi @JAWRobot.

The architecture name of the Nano 33 BLE's board platform was changed during its 2.0.0 release: https://github.com/arduino/ArduinoCore-mbed/releases/tag/2.0.0 Previously the mbed architecture was used for all Arduino boards that use the Arduino Mbed OS core. As more boards were added, the platform got huge! The platform was split into "families ("Arduino Mbed OS Nano Boards", "Arduino Mbed OS Portenta Boards", "Arduino Mbed OS Edge Boards", "Arduino Mbed OS RP2040 Boards").

This library still has the old mbed architecture in its metadata field that specifies which boards architectures it is compatible with. Since that doesn't match with the new mbed_nano architecture of your Nano 33 BLE, you get this "may be incompatible" warning.

JAWRobot commented 3 years ago

Hi @per1234,

Thank you for the reply! So despite the definition change I should still be able to use this board?

I realised that there are two OV7670 cameras. A 16 pin one which is used in the examples and an 18 pin one. I'm using the 18 pin one and that's potentially the issue. Assuming I wire the other two pins to not be used, is this library compatible with that variation of the camera?

Following from my previous comment I successfully edited my local library version to indicate where inside the .begin() function it was failing. The ov7670_s_power function keeps returning as false and breaking the begin function at that point. Just unsure as too what this function is doing exactly and how I can trouble shoot where the issue is.

Thank you again for your time!

JAWRobot commented 2 years ago

After some trouble shooting the issue ended up being a poor connection at the pin header. The library also works fine with the 18 pin version of the camera after wiring the RESET pin to HIGH and the Power Down pin to Ground.

Thanks again for the help.