jrleeman / PiBooth

Raspberry Pi Photo Booth
9 stars 2 forks source link

Timing issues #6

Closed Camac881 closed 8 years ago

Camac881 commented 8 years ago

Hi John, I have built your wonderful project, coincidentally for a wedding, but I'm having an issue. Everything comes up as it should, except the countdown doesn't work correctly. The issue is random in length, but it can take from 20 seconds to a full minute to do the 5 second count. The led flashes in a random pattern with differing lengths of on and off time. I also get a capture timeout error on the third photo. I have commented out different things and shortened some of the sleep times, but it doesn't improve. There is also about a 5 second delay for it to notice that the BRB is being pressed. I have rebuilt the flash from scratch to make sure something didn't glitch, but it didn't make any difference. Any ideas on how I can debug this? Thanks, Cam

jrleeman commented 8 years ago

Hey Cam - I remember this happening during development, but it was ironed out pretty quickly. I think it was an OS overhead issue. Are you running from the terminal in the OS? I think that would cause this behavior, but if you setup the autorun on boot without loading the OS GUI it should be okay. Even rebooting to terminal only would probably be enough.

jrleeman commented 8 years ago

@Camac881 - Did that solve your problem?

Camac881 commented 8 years ago

Hi John - Thanks for checking in on me. No, it is still acting the same. Plus I had to change the setup to run 'safe' mode on the video or I get a blank screen. I don't even get to the second series, or at least after five minutes my patience ran out and I hit escape. I get three errors; in photoButtonPress fname = takePhoto() , in takePhoto camera.capture(path) , and in camera.py in capture 'Timed out waiting for capture to end' Then it explains picamera.exc.PiCameraRuntimeError: Timed out waiting for capture to end

The errors are consistent with or without the GUI. My hardware is a Raspberry Pi 2 Model B running the latest Raspbian 4.4.16-v7+, if that matters. Thanks, Cam

jrleeman commented 8 years ago

Have you updated all of the packages? I'd run sudo apt-get update and then sudo apt-get upgrade. Do the examples on the picamera page work? Could be an issue with the hardware if this is the new higher resolution camera that just came out.

Camac881 commented 8 years ago

Hi John, OK I ran update and upgrade and got three minor updates. I wrote and ran the camera tests and got multiple photos to the desktop and the video file recorded and played fine. I ran it all from the GUI and the timing and screen were fine. The reason I mention the screen is that I changed the resolution from 'safe' to normal hdmi. What should I look at next? Thank you so much for helping me with this! Cam

jrleeman commented 8 years ago

Ok - I’m a bit confused. The Photo Booth program ran fine with normal HDMI?

Is this the newest version of the Pi Camera? They recently increased the resolution and it could be something odd there, but I don’t think that is the most likely cause. What kind of monitor and what resolution are you using?

On Aug 11, 2016, at 5:41 PM, Camac881 notifications@github.com wrote:

Hi John, OK I ran update and upgrade and got three minor updates. I wrote and ran the camera tests and got multiple photos to the desktop and the video file recorded and played fine. I ran it all from the GUI and the timing and screen were fine. The reason I mention the screen is that I changed the resolution from 'safe' to normal hdmi. What should I look at next? Thank you so much for helping me with this! Cam

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jrleeman/PiBooth/issues/6#issuecomment-239301770, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT2lZH8-pn8KVW5ziw-nfbbB9yIwaqOks5qe5b0gaJpZM4JbQ08.

Camac881 commented 8 years ago

Hi John, No, the Photo Booth program only runs in safe mode. The example programs ran in HDMI. I am using a V1 five megapixel camera and a 22" monitor at 1920 x 1080. I tried disconnecting the front LED, in case it was causing a load, but no difference. I've also disabled sections of the program to see if it gets stuck in one of them, but I don't get any consistent results.

jrleeman commented 8 years ago

Have you tried changing the the resolution on line 364?

Camac881 commented 8 years ago

OK, I changed the resolution to 1920 x 1080 and the program now comes up in normal mode. I don't have to change to safe mode. (Progress!) The timing is still off and it hung on the third photo. I escaped out after five minutes and got the same errors that I have been getting. Traceback (most recent call last): File "photobooth.py", line 190, in photoButtonPress fname = takePhoto() File "photobooth.py", line 132, in takePhoto camera.capture(path) File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 1388, in capture 'Timed out waiting for capture to end') picamera.exc.PiCameraRuntimeError: Timed out waiting for capture to end

Thanks for your help, I really appreciate it.

jrleeman commented 8 years ago

No problem - It is progress. What power adapter are you using? This is beginning to sound like a power issue.

On Aug 17, 2016, at 11:38 PM, Camac881 notifications@github.com wrote:

OK, I changed the resolution to 1920 x 1080 and the program now comes up in normal mode. I don't have to change to safe mode. (Progress!) The timing is still off and it hung on the third photo. I escaped out after five minutes and got the same errors that I have been getting. Traceback (most recent call last): File "photobooth.py", line 190, in photoButtonPress fname = takePhoto() File "photobooth.py", line 132, in takePhoto camera.capture(path) File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 1388, in capture 'Timed out waiting for capture to end') picamera.exc.PiCameraRuntimeError: Timed out waiting for capture to end

Thanks for your help, I really appreciate it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jrleeman/PiBooth/issues/6#issuecomment-240615811, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT2ldTbLwh_X0C-PCats4vRZucXiz4Zks5qg9OygaJpZM4JbQ08.

jrleeman commented 8 years ago

@Camac881 Any progress?

Camac881 commented 8 years ago

Hi John, No, I had to give up as I was running out of time. I tried another project, PiPhoto, and that had its own set of issues, although the timing was fine. I dropped the Pi platform and went with a PC approach that went off without a hitch. Thanks for all your help with this. When I get some time I'll see if I can figure out what went wrong here.

jrleeman commented 8 years ago

Sorry to hear that. Since I can't reproduce it on my end, I'm going to close this, but if you run into it again and are having issues, please reopen.