porkbuns / shmile

The DIY photobooth, at your service.
75 stars 39 forks source link

Raspberry pi USB reset #41

Open HughFokker opened 8 years ago

HughFokker commented 8 years ago

Greetings

Raspberry Pis keep losing camera connection.

http://blog.brainmassage.co.uk/2012/12/raspberry-pi-usb-reset-code/

Shows the code to resolve the USB issue for the Raspberry Pis and will also help other machines if they have an issue.

This revision would greatly help the build.

Just thought it would help with the inconsistent stability. Every time it loses ability to take next picture if I manually do the USB reset it seems to resolve and when I don't I can't even take a test snap with gphoto. This should resolve the issues.

Thank you,

Hugh

techyteach-s commented 8 years ago

Hi Hugh,

I'm not sure if the issue you mention here is the same problem that I was having, but if you have a look in the Shmile on the Raspberry Pi Wiki I've resolved a problem I had, what would happen is that after say, 2 photos the script would fail. I managed to resolve the issue by modifying the image_compositor.coffee

From the wiki: Issue that causes program to only take 1 or 2 Photos

I found when I initially got the Raspberry Pi running that it had issues only taking 1 photo at a time. After much frustration I found that the new version of imagemagik had a new argument, instead of -size it needed -resize. In line 61 of the code for image_compositor.coffee -size needed to be changed to -resize, once this was complete it worked without any issues. Furthermore I also found that the SLR connected needed to be setup to take photos in only JPEG, not RAW, this also causes some issues.

An edited version of image_compositor.coffee can be downloaded from: https://github.com/techyteach-s/shmile-Raspberry-Pi-fix

simply download, and substitute it for the file in the 'lib' folder of shmile.

Let me know how this goes for you.

I had the photobooth going using a raspberry pi and ipad mini for my wedding on the weekend and it worked great, only issue I can find presently is that there seems to be a memory leak and the script/pi (depending on setup) has to be restarted every 20 uses or so.

Hope this helps - Simon