The PicUp Party Pi

Forums:

Unit

The party pi was based off of my image scrolling pi. A piNOIR camera has been added and takes pictures on a scheduled basis using chrontab. It uses a 3.5 inch display and is housed in a 3D printed case which I will make available on Thingiverse soon. The case takes about 2 hours to print both pieces, though you could print them together, I printed them seperate. I am currently printing a transparent red PET version of the case and will upload pictures if it completes. (note the "if")

Parts

Nice Pi Zero Starter Kit with cables: https://amzn.to/2XbhKvg Full CanaKit Pi Starter Kit: https://amzn.to/2JtFyrc Camera: https://amzn.to/2FNknwD Pi Zero Camera Ribbon Cable: https://amzn.to/2FMH3gm

Concept

The concept is simple. Place the unit somewhere at the event. As images are displayed and people move around the event it will snap random pictures. This allows you to set the unit somewhere and it will do the rest. The idea came to me while I was playing with the picture viewer set up.

Automated Image Uploads

The images are then uploaded via FTP to a website where people can view them using their mobile devices if they so choose. I am using the mobile hotspot on my cell phone for uploading the images. Currently all uploads are done using my home wifi. Images are approximately 500k at 1024x768 resolution, so they do not consume a lot of space at 1 picture every 5 minutes. The piNOIR can take much higher res pictures but I wanted to keep the transfer size at a minimum. While the guests can view the captured images from the event on the upload site, you can allow them to visit your party pi by giving them the URL displayed on the screen.

The cron job

To fire off the image capture every 5 minutes I created a cron job to fire off picup.sh. A simple bash script to push the images to the server via FTP. cron -e will open the editor Add the line: (or change /5 to how many minutes you want between images) */5 * * * * /home/pi/bin/picup.sh # JOB_ID_2

The Web Page

Viewing the images captured during the event is handled using a simple php web page. On load or refresh it will load up all of the images captured into the drop down list. Currently you have to select them and press the button, but I may add a java script loop that will simply display them as the local web page does, using the compiled list of images from php and a cycle loop.

Battery Power

I found this dual set of battery packs for under $20 at my local Sams Club. Since the pi zero does not consume much power, my initial test lasted a good 8 hours or so. This may however diminish after I added the wifi uploads of the pictures and the piNOIR camera unit. I will run a second test to get an approximated time limit the battery will last before needing recharged. This will allow me to place the unit without requiring an electrical outlet.

Upload Toggle

To control snapshots and uploads (on/off) a small python script will do the trick. Button from command page will toggle the existence of a file. If it exists then it will upload. If it does not, it will simply skip the entire image process.
#!/usr/bin/python import os pic_file = r"/home/pi/bin/relay/relayweb/picson" if os.path.isfile(pic_file): os.remove(pic_file) else: with open(pic_file,"w") as file: file.write("on")

Control

Control of the unit is handled by a cmd.html page. This allows a clean reboot and shutdown, the ability to stop and start image capture and uploads, IP and gateway information and forcing a snapshot remotely. While a clean shutdown is key, the pic status keeps it from transmitting images while you are setting it up and waiting for the event to begin. I have created a new image of the micro SD card and it should be fairly finalized. The next step of the project will be to rebuild the entire project with new and appropriate file names, directory structure, etc. Currently the files are remakes of the relay project and should be rebuilt.
I will be posting up the source code, set up, stl files, etc as time permits and upon project completion.
-6.1193329,39.1580149,06-24-2019 09:36:30 PM,!Bio break