Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
Camera example not running after compilation
-
Hello, I have been trying to run the camera example, but when I try to use the command "camera" to compile it in the Nuttx Shell I receive the command "camera not found", this is while using VS Code. A hello world example in my created workspace ran fine. I tried the camera.ino example in the Arduino IDE, compiles fine, but the Arduino serial monitor prompts me to insert the SD Card. I Have the SD card installed though, below is the error I get on VS Code.
-
@Benediction-1-2
Nuttx Shell does not compile anything but starts commands that you have compiled and uploaded beforehand. Each sample needs to be compiled separately. Maybe you compiled only hello world?
Can you please check that you compiled the Spresense SDK camera sample and uploaded it and that the command matches the sample project name?Regarding the Arduino prompt for the SD Card. Can you please double check if the B2B connector between Spresense Main board and Extension board is correctly attached? Push the boards evenly and gently together.
Alternatively please check the camera.ino and modify it. See line 130Serial.println("Insert SD card.");
-
Hello @jens6151-0-1-1 , I compiled the camera example, still no success. I tried coping the code to a different file, but still no luck, while doing this, I tried running a previous "hello world" example that I had compiled prior to compiling the camera example, it ran successful, which is interesting because I didn't build and flash it again. For the case of Arduino, line 130 is exactly as you stated, how do you suggest I made edit to it, please advise.
Also, could the SD card problem with Arduino stem from the fact that I am using a 128GB memory card, should I be using less?
-
@Benediction-1-2
According to the documentation a 128GB memory card is not supported. I currently do not find the link again. But you should get a FAT32 formatted micro SD or SDHC Card with max. 32GB.
How to edit the code ... I would say you first should go through the documentation and understand what the code does. See https://developer.sony.com/develop/spresense/docs/arduino_developer_guide_en.html#_explanation_by_sample_code. I thought about removing the SD card code to see if the camera works (i.e. no error is returned).
Anyway, you should make sure to get a working SD card first (Is your goal to save images to SD card?)
-
Hey @Benediction-1-2 and @jens6151-0-1-1
I couldn't find anything in the documentation regarding a maximum SD card memory limitation. If you do find it, please send me the link so I'm aware of it.
But, my guess is that your SD card is not formatted as FAT32.
SD cards with 32GB or less storage are usually formatted in FAT32 by default. Larger SD cards are usually exFAT by default. So unless you formatted it to FAT32, that would cause the program to not recognize the SD card.Another thing that could be causing an error is if your sd card has multiple partitions.
It should have only one partition.Please check these points
-
@CamilaSouza
I do not remember where I got the 32GB limit. It might be simply wrong.
It seems like Windows cannot format larger cards than 32GB FAT32, but this is no limitation of Spresense. If you use Windows, you need a 3rd party tool to format the card correctly. -
@jens6151-0-1-1
Cool. Thanks for the tip!
-
Hi @CamilaSouza, the issue was exactly how you stated, the SD card was formatted as exFAT32, I only had to go to my computer settings and format it is FAT32. The sample code finally was able to work and capture images while using the Arduino IDE. Although I’m using the Arduino IDE, my preference is VS code, but the camera example still fails to run while using the command “camera” to run it. Perhaps I’ll try another example. Please read through the earlier threads to see whether you’d be able to help resolve this issue. Thank you.