0

Arduino Serial Camera
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Arduino Serial Camera

by trotterlg on Tue Aug 13, 2019 11:25 pm

I have one of the Arduino serial cameras running and taking pictures and transferring them to an SD card. Only issue I had was the default baud rate on my camera was set to 115200 so I ignored the warning and reset it to 38400 and life was good. Issue I have is that I cannot change the image size in the snapshot sketch. No matter what I do it remains 640x480. I need a very small picture to send over a very slow rf link so I need to set it down to the small size. I will never need it to be bigger, don't care to be able to change the size, I only need to make it a small picture and have it stay that way. I can talk to the camera with the serial tool just fine and I have tried everything I can think of in the code and library to get it to resize. I know someone must know an easy way to shrink the picture and make it the default in the camera My code is exactly the code from the snapshot example with no editing at all except for commenting out the large picture line and uncommenting the small. Thanks.. Larry

trotterlg
 
Posts: 5
Joined: Tue Aug 13, 2019 11:12 pm

Re: Arduino Serial Camera

by adafruit_support_mike on Thu Aug 15, 2019 2:34 am

Try setting the baudrate back to its default value and see if the camera will accept the command to change the image size.

The code is a very blind reverse-engineering of the signals on the camera's pins. We have no information about the firmware inside the image processing chip, so anything is possible.

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Re: Arduino Serial Camera

by trotterlg on Thu Aug 15, 2019 11:45 am

Good though however with the rate set to 115200 (default on my camera) the camera can’t be found by the arduino even if I edit the library so it begins looking for the camera at 115200. As a workaround I tried just moving the compression ratio way up to reduce the file size however I cannot fin any way to get the camera to save the higher settings after restarting.

trotterlg
 
Posts: 5
Joined: Tue Aug 13, 2019 11:12 pm

Re: Arduino Serial Camera

by trotterlg on Thu Aug 15, 2019 6:13 pm

I do see that when the camera is found it says
VC0703 1.00
No ctrl infr
MI360
625
Init end


Wonder if I should write hex directly to the camera in the sketch to set the size? Does the No ctrl infr mean the sketch cannot control the camera?

trotterlg
 
Posts: 5
Joined: Tue Aug 13, 2019 11:12 pm

Re: Arduino Serial Camera

by adafruit_support_mike on Fri Aug 16, 2019 9:48 pm

It would be easiest to set the parameters from the sketch instead of trying to get the camera to store the values, yes.

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Re: Arduino Serial Camera

by trotterlg on Fri Aug 16, 2019 10:00 pm

A little line of code to tell the camera to take a very small picture would be appreciated. I am running the sketch in the examples folder exactly as published.

trotterlg
 
Posts: 5
Joined: Tue Aug 13, 2019 11:12 pm

Re: Arduino Serial Camera

by adafruit_support_mike on Sat Aug 17, 2019 11:12 pm

These lines from the example sketch are the simplest we know:

Code: Select all | TOGGLE FULL SIZE
  cam.setImageSize(VC0706_640x480);        // biggest
  //cam.setImageSize(VC0706_320x240);        // medium
  //cam.setImageSize(VC0706_160x120);          // small

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Re: Arduino Serial Camera

by trotterlg on Sun Aug 18, 2019 1:48 am

Those are very simple, and I understand them. I think the issue I have is what those call from the library. In my case with that not working I think I need to call a much lower level of command to the camera as in writing hex to it for the size command. I have found a hex string that commands a small image, however I simply don't know how to issue that command to the camera in the sketch.

trotterlg
 
Posts: 5
Joined: Tue Aug 13, 2019 11:12 pm

Re: Arduino Serial Camera

by adafruit_support_mike on Mon Aug 19, 2019 12:02 am

It's just a matter of using .print() to send the command through the Serial interface.

Take a look at the VC0706 library for examples of the direct communication. The lowest level of communication are all the way at the bottom of the file:

https://github.com/adafruit/Adafruit-VC ... VC0706.cpp

adafruit_support_mike
 
Posts: 58856
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.