Hi everyone, i've been learning a lot from this forum for a long time. Always trying to solve my problems on my own, looking for the answers on the infinite pages, and in most cases it took me a long time to understand, but I always found the way. And even though I did not know anything about programming, I managed to make it work, just reading the forum.
I'm very grateful for this.
So, I'll briefly tell you what I did and how I came to this point with no way out for me but to ask for help.
My project consists of controlling 42 cameras at the same time. First I was able to make it work using chdkptp and the multicam.lua codes. Which worked perfectly. I was able to shoot, download and delete all 42 cameras without any problems. With one exception, of course, now the big problem to be solved was the synchronism between the cameras.
Back to the forum, I discovered that I could achieve better synchronization using USB Remote and could keep the ptp connection. Why not try?
I cut one of the usb cables, just the
red wire, and I plugged it into a simple switch that turns on and off. Cable hacked perfectly.
At this point, it is very important to say that I'm using
CHDK 1.4.1 on SDcards and
CHDKPTP-r723 on a PC.
With that in mind, I plugged the camera into the hacked cable and plugged it into the pc.
I opened the chdkptp, connected the camera and used this codes sequence:
=usb_force_active(1)
=switch_mode_usb(1)
=usb_sync_wait(1)
=shoot()
In this last command, the camera set the focus and waited, I pressed the switch of the hacked cable and the camera took the photo.
After that I put the download and delete codes and it worked perfectly.
I was so happy to make it work. And promptly I made another hacked usb cable, to do the test with two cameras.
And that's when I got stuck.
I connected the two cables to the same switch, tried to use the same codes, but only one of the cameras executes the commands.
How do I get the command to go to all the connected cameras?
I understand that I could add this to the multicam.lua script, but how?
Seems simple, but I do not have the knowledge to do it.
The answer seems to be in my face, but I can not see.
http://chdk.wikia.com/wiki/Lua/PTP_Scripting#usb_force_activeHow to add this PTP Functions to work on a script like multicam.lua?
Well, I hope someone can give me some light or a little big help with this.
And sorry for my bad english from google translator.