I am new to Arduino but have been able to get this small project up and running up until I get to the camera taking pictures. I am basing it off of this Critter gram project from Makezine.
When I take pictures with the camera, an empty jpg file is generated but no image.
This is a link to the code, it is very similar to the crittergram but adjusted to use Ultrasonic sound to trigger the picture to be taken.
This is an image of the project.
Besides the camera and ultrasonic sonar module, I am also using the SD card board on top of the Arduino. I have tested both the sonar and the SD card and have been able to track distance and write to text documents on the SD card.
Any help you can provide would be greatly appreciated.
Ok. Now when you put the SD card in the PC, how large does it show the file to be? You say the image is empty. If so, that means the file was created and closed before any image data was written.
Change the Arduino program so that the data going to the SD card it displayed on the PC monitor screen by using the Serial.writeln() command. But first enable the serial monitor. You will find that in most of the example programs.
I attempt to print the contents of this variable found to be written to the sd card file but I get the following error. I think the VCO7O6_rx_buffer is not a variable friendly to println.
crittergram.ino: In function ‘void capture_photo(char*)’:
crittergram.ino:186:41: error: call of overloaded ‘println(unsigned char [80])’ is ambiguous
crittergram.ino:186:41: note: candidates are:
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Stream.h:26:0,
from /usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:28,
from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:193,
from crittergram.ino:26:
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:68:12: note: size_t Print::println(const String&) <near match>
size_t println(const String &s);
^
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:68:12: note: no known conversion for argument 1 from ‘unsigned char [80]’ to ‘const String&’
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:69:12: note: size_t Print::println(const char*) <near match>
size_t println(const char[]);
^
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:69:12: note: no known conversion for argument 1 from ‘unsigned char [80]’ to ‘const char*’
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:70:12: note: size_t Print::println(char) <near match>
size_t println(char);
^
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:70:12: note: no known conversion for argument 1 from ‘unsigned char [80]’ to ‘char’
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:71:12: note: size_t Print::println(unsigned char, int) <near match>
size_t println(unsigned char, int = DEC);
^
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:71:12: note: no known conversion for argument 1 from ‘unsigned char [80]’ to ‘unsigned char’
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:72:12: note: size_t Print::println(int, int) <near match>
size_t println(int, int = DEC);
^
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:72:12: note: no known conversion for argument 1 from ‘unsigned char [80]’ to ‘int’
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:73:12: note: size_t Print::println(unsigned int, int) <near match>
size_t println(unsigned int, int = DEC);
^
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:73:12: note: no known conversion for argument 1 from ‘unsigned char [80]’ to ‘unsigned int’
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:74:12: note: size_t Print::println(long int, int) <near match>
size_t println(long, int = DEC);
^
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:74:12: note: no known conversion for argument 1 from ‘unsigned char [80]’ to ‘long int’
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:75:12: note: size_t Print::println(long unsigned int, int) <near match>
size_t println(unsigned long, int = DEC);
^
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:75:12: note: no known conversion for argument 1 from ‘unsigned char [80]’ to ‘long unsigned int’