However, now I've got it all wired up, I find the script halts, simply due to the USB cable being connected even with the Raspberry Pi switched off.Any suggestions?
Another, related, niggle.. when powering up the IXUS from the Raspberry Pi, I get a chdkptp error that 'a script is already running'. So even though the OneShot script halts because it sees a connection at the USB port, the USB port won't allow chdkptp because of the script.
If USB active then [ Ignore Wait Exit ]
First of all, I assume you are using the latest version of the script I posted : One Shot v3 ?
If you disable the display blank option, do you see the message "USB cable detected" on the LCD after your two second startup delay completes?
Please elaborate on what you mean by "the script halts". Does it seem to stay running but is stuck after the "USB cable detected" message is printed?
What happens if you gently pull the USB cable out of the camera while it is "halted"? What about if you press any key or the zoom lever?
I'm guessing you are still getting power from the Raspberry Pi's USB port even though the Pi is "off".
root@piZero5:~# chdkptp/chdkptp.sh___> connectconnected: Canon IXUS 160, max packet size 512con> recERROR: a script is already runningcon>
I'm sure I can add a relay to disconnect the ground wire of the Pi as well as the positive wire, to work around this.
However, I just found another issue.. with the WAIT option enabled as in the second example above, the Pi can connect to the IXUS using chdkptp but after this, any ....
What setting are you using for Code: [Select]If USB active then [ Ignore Wait Exit ]I'm guessing you picked Wait but should be using Exit?
insert a 100 ohm resistor on any of the USB jacks between pin 1 and 4 I'm guessing this strange behavior will go away. It's possible you will actually need the resistor on the jack connected to the camera but I'm betting any jack will do.
So if you could please modify OneShot, as you suggest, so that it shuts off the camera, only after a non USB connected session, that would be awesome.
I next tried disconnecting the Raspberry Pi's power cord but leaving the USB cable connected and this time the OneShot script didn't halt ie. it worked as if the cable were not connected. This seems a vital clue
Please could you make it a bit clearer which pins (jacks?) of the USB lead, I need to connect with the resistor?
Started by dayzman Script Writing
Started by Barney Fife General Discussion and Assistance
Started by Salvatore Chiarelli General Discussion and Assistance
Started by Sdack « 1 2 ... 10 11 » General Help and Assistance on using CHDK stable releases
Started by Mlapse « 1 2 » Feature Requests