I'm starting with Arduino and Would like to know if it is possible.
Connect to a Canon Digital Camera using USB, the Arduino will make a shot, get its file name(last picture), get GPS coordinates and write a text file with:
file "name.jpg", "Latitude","Longitude"
Of course it's possible, since Canon does exactly that sort of thing (intervalometer) in their utilities. You'll need:
A USB Host shield.
A library to run it.
The knowledge of what commands to send.
The knowledge of how, specifically, to send them on the USB Host
The first two are somewhat easy, for certain kinds of USB peripheral
The last two are more difficult. The Canon SDK (document that defines the protocol), may or may not be readily available.
There are, however a few other ways, and some or all of them may not be applicable to your camera.
Use an IR LED and send out the appropriate commands. Difficulties with this are (a) The LED must be in front of the camera, and (b) you have to capture the codes from a Canon IR remote in order to know what to send.
Use the wired remote jack. This only requires a 2.5mm stereo plug (on my Canon XZI (D1000)).
If you don't have a DSLR, but do have a PowerShot, you might want to look into CHDK (Canon Hack Development Kit). It lets you load prorgams into your camera's SD card, which can be run, giving you such things as intervalometers, motion detection, and many more goodies. You might be able to detect when a shot is taken while running an on-camera intervalometer, and act upon it with the Arduino.
I don't think you're going to get the name of the picture, as there is no interface in that model that is capable of communicating that information, except for the USB port.
If you are going to try for a CHDK solution, I think the best you can hope for is to detect that a picture has been taken, and write a file with a name that includes an incrementing number. Possible detection methods might include a microphone to detect the "click" sound, a photocell to monitor the viewscreen, looking for some recognizable cgange, or if you can set the flash to go off for every picture, a photocell to monitor that.
Then, when you copy the pictures to a directory, they should be in the order taken, by filename, and the file with the GPS data will have entries corresponding to those pictures.
cabecinhas:
Do you think The arduino is capable to read The Canon using USB cable and then read The file name?
Maybe using analog input?
Of course, but see my first reply to you in this thread.
Analog input? That doesn't make any sense at all. USB is a hardware interface that allows data transfer using a specific protocol.
An analog input allows you to read a voltage level on a pin.
I’m planning to continue camera control code development – next milestone is Canon Powershot command set support, and it is very close to release. I’m also planning on making a small controller for Canon DSLR video mode. Stay tuned!
Keep checking back to that site to see if he has doe it for the PowerShot yet.
So, it looks like you will be able to have the Arduino take the photos, but not have it interact with the files on the camera.
But you can get a MicroSD shield for the Arduinio....
I would have the Arduino take the picture and write a record with the GPS data to a file on the MicroSD card in the shield, along with what the Arduino thinks the filename should be, Cannon look to use an incremental file numbering system so this shouldn't be difficult.
Then back home behind the computer you could write a little script to insert the GPS data into the EXIF of the .jpg files. I use Linux and Python so would look at this: GitHub - bennoleslie/pexif: Python EXIF parsing