USB remote and USB connect from script

  • 3 Replies
  • 2242 Views
USB remote and USB connect from script
« on: 15 / June / 2010, 15:16:18 »
Advertisements
Hello all,

I've searched the forum but haven't found a solid answer to this one.  I'm writing a uBasic script that uses the USB remote functionality.  I'd also like to connect to a PC from the same script.  Is this possible?  SDM has the make/break USB connection commands, I'd like something similar in CHDK.

Re: USB remote and USB connect from script
« Reply #1 on: 13 / July / 2010, 15:46:23 »
I did this:

take_photo_now
   sleep 250
   enable_usb_download
   sleep 9000
   disable_usb_download

then I have a script on my computer that gets the pic then deletes it from the camera.

I just selected "Do nothing" when the camera connects to the pc and have the vb program I made running in the background waiting to do its job...


my problem is it gets stuck in playback mode after that...

Re: USB remote and USB connect from script
« Reply #2 on: 16 / December / 2010, 05:58:52 »
i have sdm installed on my sd cards. remote shutter operation works as expected.

Now, I need to be able to quickly switch my camera to usb mode to download the pictures to the computer. I would like a script that would switch to this mode when I press <alt>, and then switch back to direct mode to continue snapping pictures when I press the <alt> again. I tried to put in this script:

@title Connect to PC
enable_usb_download

but when I start the script from the <alt> menu, I get a ubasic: 2 parse error.

Please help!! I don't know what I'm doing.

*

Offline zeno

  • *****
  • 884
Re: USB remote and USB connect from script
« Reply #3 on: 16 / December / 2010, 12:05:24 »
try adding an "end" statement after the enable line
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit


 

Related Topics