'arducamDelayMs' not declared in Arducam capture2SD example for Arduino UNO

Hey everyone, I’m trying to get the Arducam B0401 camera module working with an Arduino UNO. I downloaded the Arducam_Mega repository from GitHub and opened the capture2SD example (under examples/ArduinoUNO/capture2SD) in Arduino IDE 2.3.6.

I’m following this YouTube tutorial (https://www.youtube.com/watch?v=VbIuqJY9mUE) and eventually I want to connect the camera via SPI to an STM32F407 DeveBox board, but first I just want to get it running on the UNO.

Problem is, it won’t compile. I keep getting:

‘arducamDelayMs’ was not declared in this scope

The error log points to something about an SD.h file mismatch. I’ve already verified my Arduino IDE installation is clean and double-checked all the .h files to make sure nothing is conflicting, but still no luck. Anyone run into this?

Before diving deeper into the capture2SD issue, can you try loading the “full featured” example from the same repository? It’s in the same examples folder. That sketch doesn’t touch the SD card routines, so if it compiles and the camera works with it, we’ll know the core library and hardware are fine and the problem is isolated to how capture2SD resolves its includes.

Good call — I just loaded the full featured project and it compiles without any errors, and the camera works perfectly. So the hardware and base library are solid.

I did find a workaround for capture2SD though. If I use the full absolute path in the include like this:

#include “C:\Users\myUser\Arduino\libraries\Arducam_Mega-main\src\Arducam\Platform.h”

…it compiles and runs correctly. So something about the relative include path isn’t being picked up by the compiler.

But now I’ve hit another snag — the Arduino UNO doesn’t have a built-in SD card slot (should’ve thought of that earlier, I know). So I need an external SD card module. I was thinking a standard I²C model might do the job. Can anyone recommend a specific SD card module that works well with this setup, and what the pinout should be on the UNO?

I’ve attached a screenshot of the capture2SD project structure I’m working with.

Thanks for the screenshot and the detailed troubleshooting — that really helps narrow things down. The original compilation error ('arducamDelayMs' was not declared in this scope) happens because the compiler can’t locate the Arducam/Platform.h header file. The include path simply isn’t resolving the way the sketch expects.

The proper fix is to add this line to your capture2SD .ino file:

#include “Arducam/Platform.h”

If the relative path still fails for some reason, falling back to the absolute path you discovered works too — just replace <username> with your actual Windows user folder:

#include “C:\Users<username>\Arduino\libraries\Arducam_Mega-main\src\Arducam\Platform.h”

And as a baseline sanity check, keep using the full featured project to verify the camera itself is behaving as expected.

As for the SD card module recommendation and pinout — that’s getting into platform-specific hardware integration, which falls a bit outside what we cover on the Arducam side. I’d suggest posting that question over on the Arduino community forums; they’ll be able to point you to a module that plays nicely with the UNO’s SPI pins. Glad to hear the camera itself is working!