I manged to use the librs232 (or luars232) solution for lua, a library that can read/write to serial ports. I am running the system in Windows.
Well actually it isn't of interest for me where exactly the data is buffered, as long as nothing is lost. I will try with the timer, I am quite sure that will do fine.
Now I will use another Arduino to cut and close the USB cables too.
With regards to CHDK I don't understand, I am sorry. When using CHDK it is no problem to switch between all the cameras within one instance. You are right, one instance can only communicate with one camera, uniquely. But instead of starting 100 instances of CHDKPTP I wonder if it isn't better to have SOME instances that each will have their set of cameras they serve for. I can't imagine that say 100 instances running at the same time would be of advantage for stability and speed.
With regards to your light solution: I use an Arduino that switches a very cheap wireless power switcher you use in household, like these. This way the lights are turned of by the system, then everything that needs to be done in darkness is done in darkness, and afterwards the system switches the light back on. :-)
And here is the shooting sound...
action=function(self) mc:connect() local b = 1 if b == 1 then -- mc:connect() mc:start() mc:cmdwait('preshoot') mc:cmdwait('shoot') mc:cmd('exit') sys.sleep(500) --local devices = chdk.list_usb_devices() local strDestPath = string.format("%04d%02d%02d_%02d%02d%02d",os.date('%Y'),os.date('%m'),os.date('%d'),os.date('%H'),os.date('%M'),os.date('%S')) local osTAll = os.clock() print("\n--- START DOWNLOAD ----------------\n") os.execute("mkdir " .. muca.dest .. strDestPath) -- muca.dest ) e.g. "C:\DOWNLOAD" for iIndex, lcon in pairs(mc.cams) do if lcon:is_connected() then strCam = lcon.mc_camNAME strFileName = "/"..strCam..".JPG" stateGetName, name=lcon:execwait([[return string.format("IMG_%04d.JPG",get_exp_count())]]) -- stateDL = lcon:mdownload({'A/DCIM/100CANON'},muca.dest..strDestPath,{fmatch="%.JPG$"}) -- if stateGetName then local osThis = os.clock() stateDL = lcon:download('A/DCIM/100CANON/'..name, muca.dest..strDestPath..strFileName) if stateDL then local size = lfs.attributes (muca.dest..strDestPath..strFileName, "size") if not size or size <= 1 then iup.Message("IMAGE ERROR","Image not found on local hard disc or image size <= 1 "..name.." FROM "..strCam) stateDL = false end end if stateDL then --stateDel = lcon:mdelete({'A/DCIM/100CANON'},{fmatch="%.JPG$"}) stateDel = lcon:remove('A/DCIM/100CANON/'..name) if not stateDel then iup.Message("ERROR DELETING IMAGE","ERROR DELETING "..name.." FROM "..strCam) end end print(string.format("DL TIME %s %s: %.2f", name, strCam, os.clock() - osThis)) -- end end end print("- - - - - - - - - - - - - - - - - ") print(string.format("DL TIME ALL : %.2f", os.clock() - osTAll)) print("\n--- END DOWNLOAD ----------------\n") end end, },
Started by Nestkast Script Writing
Started by reyalp General Discussion and Assistance
Started by ikercito « 1 2 3 » General Help and Assistance on using CHDK stable releases
Started by studwell76@yahoo.com RAW Shooting and Processing
Started by shinnen General Discussion and Assistance