supplierdeeply

CHDK and PTP commands

  • 1 Replies
  • 1104 Views
  • Publish
    CHDK and PTP commands
    « on: 10 / January / 2012, 06:03:26 »
    Advertisements
    Hello,

    CHDK and ptpcam is helping me a lot with my recent project.
    But I'm having hard time to make the right ptpcam script and I'm not sure if this isn't better to do with CHDKPTP program.

    I simply need to use camera for remote monitoring of small objects.
    I'm using webcam with lenses for this purpose now but it simply doesn't have enough good resolution and focus to be usable.

    So I took my old compact IXUS SD1100 and installed CHDK. I made it working with PTPCAMGUI which is amazing.

    Unfortunately I need to do all things in one script.

    1) So I need to set the camera into photo mode in auto or macro and then take shoot
    2) I need to download the last taken image, save it on computer and then preferably delete it from camera
    3) I need to set camera into sleep until the next script execution.

    When I will have the working script, I will set the computer to execute it on button press on my page and then the page will show me the image so I can see what's happening everywhere.

    And I need a help with the LUA / download script. Also - do you think it's better to do in PTPCAM or CHDKPTP.
    If someone would write me the whole working script I would love to pay for His time.

    Thanks,

    Petr

    *

    Offline reyalp

    • ******
    • 9856
  • Publish
    Re: CHDK and PTP commands
    « Reply #1 on: 11 / January / 2012, 00:28:21 »
    And I need a help with the LUA / download script. Also - do you think it's better to do in PTPCAM or CHDKPTP.
    I would use chdkptp for this kind of thing, because you can write script all the camera control in lua on the PC side, instead of having some other program that repeatedly invokes ptpcam and parses output and so on. But I'm biased :-[ if you are not comfortable with lua scripting, a different approach may work better for you. Also, I consider chdkptp pre-alpha at this point. The core ptp functions work, but there are lots of rough edges and stuff that was thrown together just to get something working.

    You can use chdku.listdir to find the latest file, and chdk.download to download them. See downloaddir and deletefiles in chdku.lua for examples.
    Don't forget what the H stands for.

     

    Related Topics