Using Multicam and Sonoff - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

Using Multicam and Sonoff

  • 12 Replies
  • 464 Views
Re: Using Multicam and Sonoff
« Reply #10 on: 27 / September / 2021, 18:29:32 »
Advertisements
Hi Reyalp,
Took the batteries off the charger, into the camera, ran the script and everything worked like magic!

I see what you are saying about
Quote
That makes sense conceptually, but I don't know enough about Sonoff and Tasmota suggest an approach. Does it somehow know the position of the table?
As of now, the turning of the table is controlled via timing.  I could add a sensor and make marks to regulate the rotation, but maybe that is overkill.  To answer your question, no, I don't have a way to know the position of the table, just how long it takes to make 1 rotation and my plan is to take that time and divide it by the number of "slices" I want to take.  If 1 revolution is 30 sec and want to take 2 slices, I have 2 x 15 sec pauses.  Take that time for the 'sys.sleep()', (meanwhile the turntable will turn) and iterate operation for the number of slices.
Quote
If you need a more complicated interaction with the HTTP API than can easily be done with curl, you could use os.execute to run something else like a python script or whatever.
Thank you very much for this guidance.  If it gets more complicated, I'll look into that.  For right now, what you have given to me is working great!  I'll keep with this script and if it needs the further development, I'll handle it then.

Thank you again for all your help!  Let me know if you are ever in Manhattan.  I'll gladly take you to a nice lunch or something.


*

Offline reyalp

  • ******
  • 13394
Re: Using Multicam and Sonoff
« Reply #11 on: 27 / September / 2021, 23:00:11 »
If 1 revolution is 30 sec and want to take 2 slices, I have 2 x 15 sec pauses.  Take that time for the 'sys.sleep()', (meanwhile the turntable will turn) and iterate operation for the number of slices.
If that gives you enough precision, it seems like that approach is fine. You could easily write a Lua function that takes the number of slices you want and shoots that many shots, like (off the top of my head, not tested)
Code: [Select]
function do_slices(num_slices)
 local rotation_ms = 30000 -- 30s for full rotation
 local delay = rotation_ms / num_slices
 for i=1,num_slices do
  mc:cmdwait('preshoot')
  mc:cmdwait('shoot')
  os.execute('curl <url>/cm?cmnd=Power%20TOGGLE')
  sys.sleep(delay)
  os.execute('curl <url>/cm?cmnd=Power%20TOGGLE')
end
If you need more precision, it seems like you'd really need some kind of feedback from the table, using sensors or a stepper motor.

Side note, if you want your cameras to all shoot in sync, you should use mc:init_sync() in the initialization code (after mc:start()) and use mc:shoot() to shoot. There is documentation for mc:shoot in multicam.lua, just before the function.

Quote
Thank you again for all your help!  Let me know if you are ever in Manhattan.  I'll gladly take you to a nice lunch or something.
Glad to help. One thing that's always rewarding about working on CHDK is seeing what people do with it, so please feel free to post about your project or any cool results you get from it.
Don't forget what the H stands for.

Re: Using Multicam and Sonoff
« Reply #12 on: 28 / September / 2021, 21:03:03 »
Reyalp et al,
Thank you very much for all your help and guidance with this project. 
From where it started to where it has ended up its like a dream come true.
Today I have been putting the hardware together & setting up the studio.
I see what you have done with the code here. I think that will work even better!
That's great!

My plan is to get everything sorted for testing this weekend. 
If I do get it running smooth, I'll need to bring in the mesh, clean them up,
get them rigged and ready for running cloth simulation.  This is where the
fun will begin! 

I'll look forward to sharing the results with you and the community here!
Hopefully, I can reflect a glimmer of the excellence that you, Reyalp, maintain.
Your assistance, development, maintenance of the software, everything is amazing.   
Thank you very much!

 

Related Topics