Shooting while transferring over USB - page 5 - General Help and Assistance on using CHDK stable releases - CHDK Forum  

Shooting while transferring over USB

  • 45 Replies
Re: Shooting while transferring over USB
« Reply #40 on: 04 / January / 2014, 18:18:50 »
And here is the shooting sound...


Offline reyalp

  • ******
  • 14098
Re: Shooting while transferring over USB
« Reply #41 on: 04 / January / 2014, 19:17:33 »
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.
That looks useful, glad to hear it worked :)
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.
I'm not really sure how it works, but it should be pretty easy to test by making the Arduino produce a bunch of output.
Don't forget what the H stands for.

Re: Shooting while transferring over USB
« Reply #42 on: 05 / January / 2014, 09:54:11 »
Now I will use another Arduino to cut and close the USB cables too.

(i) setting up all cams via chdkptp then
(ii) disconnecting usb powered hub network from PC then
(iii) power-off usb hub network [to trigger chdkusbremote]

followed by

(iv) reconnection and chdkptp SD card download

not fit your use case?

It may save a lot of soldering.

Have you carefully considered voltage discharge timing that user Hardware Hacker has referred to elsewhere?

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.

While my hope is that many instances of chdkptp will prove stable I fear you are correct and that eventually I [or somebody else] must develop the multicam module further to allow for unique bus/id control.

While I know your code doesn't do that i'd be interested to read your lua single chdkptp implementation  - might you please upload to this thread?

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. :-)

Thanks for the link.

I wasn't aware you are using dark conditions - is that for everything & using flash? if so, might you comment further on your  requirement for chdk usbremote precision sync [rather than just longer exposure times]?
« Last Edit: 05 / January / 2014, 11:56:02 by andrew.stephens.754365 »


Offline ahull

  • *****
  • 634
Re: Shooting while transferring over USB
« Reply #43 on: 05 / January / 2014, 12:09:04 »
And here is the shooting sound...

I think I might use that as my SMS ringtone.  :D

Re: Shooting while transferring over USB
« Reply #44 on: 05 / January / 2014, 13:41:15 »
Regarding the solution Hardware Hacker suggests I would maybe do that if I was capable of altering the hubs the way he describes, but I don't have the knowledge to do such things. I am no hardware geek, in no way.

Also using an Arduino to switch each channel has the advantage to delay the shots a little each, so you can get a little slow motion into the time slice effect.

With regards to the dark conditions: You have to shoot in more or less complete darkness when doing things like I do, because otherwise the people that do the lightpainting become visible.

Sorry for not uploading the complete solution right now, it is too nasty. I am an absolute Lua beginner and I did some really big mistakes in the beginning. When I have cleaned up the whole thing I will upload a multi-camera-chdkptp-gui.

This functions shoots all cameras, then download them one by one to a target folder.

Code: [Select]
local b = 1
if b == 1 then

-- mc:connect()


--local devices = chdk.list_usb_devices()
local strDestPath = string.format("%04d%02d%02d_%02d%02d%02d",'%Y'),'%m'),'%d'),'%H'),'%M'),'%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/', 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 "" FROM "..strCam)
stateDL = false

if stateDL then
--stateDel = lcon:mdelete({'A/DCIM/100CANON'},{fmatch="%.JPG$"})
stateDel = lcon:remove('A/DCIM/100CANON/'
if not stateDel then iup.Message("ERROR DELETING IMAGE","ERROR DELETING "" FROM "..strCam) end
print(string.format("DL TIME %s %s: %.2f", name, strCam, os.clock() - osThis))
-- end

print("- - - - - - - - - - - - - - - - - ")
print(string.format("DL TIME ALL                : %.2f", os.clock() - osTAll))
print("\n---  END  DOWNLOAD ----------------\n")

« Last Edit: 05 / January / 2014, 14:06:08 by Karmaschinken »

Re: Shooting while transferring over USB
« Reply #45 on: 05 / January / 2014, 13:51:30 »
Thanks for this Martin.


Related Topics

SimplePortal 2.3.6 © 2008-2014, SimplePortal