Showing posts with label pi-timolo. Show all posts
Showing posts with label pi-timolo. Show all posts

Monday, November 21, 2016

PI Critter Cam Day 16: Better Pictures

I set up the critter cam yesterday afternoon after adjusting the setup.py file in the pi-timolo folder to rotate the pictures 180 degrees and take pictures at a 1080 x 1920 resolution.  Luckily, a bird came by to test out the new settings.



The picture looks MUCH better!  However, we have a couple issue where it's taking and keeping a TON of pictures and it's overwriting all of the previous pictures.  

So, within the setup.py file, I'm going to change the threshold setting to 50, which should make the picture taker less sensitive.  I'm also going to change motionnumon to False so it'll use a date/time stamp to name the file.  I'm also change motionnummax to 0 in case it's using that setting as justification to delete stuff out there.  

We'll set it out again tomorrow morning to see how it does.  This time, I'll try setting it on the ground.

Sunday, November 20, 2016

PI Critter Cam Day 15: New Enclosures

After realizing that the previous enclosure wasn't going to work, I dug through my scrap wood bin and slapped together a few 2x2s to build a makeshift food holder.  I decided to use one of those birdfood suet bricks, which seemed easier to manage. 

I also sacrificed one of my sandwich boxes that I take to work to house the Raspberry PI, drilling a small 3/8" hole for the camera.  I sandwiched tack between the lunchbox and the PI in a feeble attempt to keep the water out. I used a clamp to attach the box to the birdfood holder.  

It's certainly not the most sophisticated design, but should work as a temporary solution.  Here's what we have.  


You can see the camera poking out from this angle with the new battery and PI inside.


I let it sit out all afternoon and it actually took some bird pictures, albeit upside down.    Yet, it's exciting to see this thing actually work!

NOTE:  I took the suet container out, just leaving the food brick.  I was worried the birds couldn't get to the food.  I should've moved that thread rod too!



Also, the battery held up really well.  The PI ran all day as there were some night pictures in the folder.  Although, I'm not sure exactly how long as I haven't been including the wifi dongle in the box to conserve battery, which messes up the PI's clock. 

 So, our next goals:  Get the pics right side up and see how much longer the battery lasts with higher quality pics and the wifi left running.


Friday, November 18, 2016

Pi Critter Cam Day 14: A Step Back

Well, things didn't go as planned. 

Every time I start the Pi, it'll take a few pictures, but soon stop working.  This is according to the TOP application accessible through the terminal that, I think, acts like a Task Manager and shows all the running applications.  pi-timolo shows up for about 15 minutes or so, then disappears from the list of active programs.  Somethings amiss.  

I tried reinstalling pi-timolo, but that didn't help.  

I then tried updating the Raspian operating system using the instructions at raspberrypi.org, which essentially has me run two lines in the terminal.

sudo apt-get update
sudo apt-get dist-upgrade

And that's pretty much it.  After it finished doing the update and performing a reboot, pi-timolo was able run all night without crashing.  Hooray!

However, the birdseed holder and Pi container are other issues.  I've got another sandwich box that I plan on using with some scrap wood.  I think the USB battery I'm using is also shot.  So, I bought another one.  I'll put everything together tomorrow and see if we can finally get this thing working...

Saturday, October 15, 2016

PI Critter Cam Day 13: Pics on Startup

Today, we're going to get our PI set up to start looking for critters and take pictures at startup.  So, when I plug it into the battery, the PI will boot and be ready for action.  

We're using the pi-timolo package now to watch for and take pictures of these critters.  Included in the pi-timolo package is a bash script (program that runs in the Raspian terminal) that you can set to run on startup.  This is according to the pi-timolo's wiki.  To run this guy on startup, you stick a path to the program in the file rc.local

To alter rc.local, use the Terminal and type in sudo nano /etc/rc.local

This brings up the terminal's file updating/ word processing program.

Scroll down to the line right above exit 0 and stick in the filepath and file name.

/home/pi/pi-timolo/pi-timolo.sh



After that, save the file with a ctrl + x, confirm you want to use the same file name with an Enter and you are done.  

Now, I'm going to put a big pile of birdseed in front of my pi, plug it in and see what I get at the end of the day.  

Tuesday, August 30, 2016

PI Critter Cam Day 11: More Motion Detection

Ok, it's been 4 weeks.  So, the software should now be installed.

We'll test it out using the Github instructions.

To do this, we simply enter these two lines into the terminal one at a time:

cd ~/pi-timolo 
./pi-timolo.py

And our screen shows the process checking for motion at approximately one second interval.  That must be these "failed to set port info" lines.

If we wave our hand frantically in front of the camera, we see that the message changes (Found Motion).  It then tells us it captured a picture and added white text.


If I check out the /home/pi/pi-timolo/ folder, I see there are pictures of my waving hand!   So, I think we have a successful test.

Now, what do I do with this?  Well, I need an enclosure and I need to figure out how to make the PI run this program at startup.  I should probably also figure out how to make it stop also if I need to.  Maybe a button or a switch to kill the python switch?

Our initial box will just be an indoors one for further testing.  I think I've got some tupperware that I can use...

Tuesday, August 2, 2016

PI Critter Cam Day 10: Motion Detection

After a bit of a hiatus, I am back.

I think I'm going to attempt to use pi-timolo after reading this guy's blog, which appears to be very similar to what I want to do.  He's capturing hedgehogs and I'm capturing whatever comes along.  Other than that, our goals are very similar.

So, tonight, we're going to try and install the software.

Using his GitHub instructions, I installed the software, but this must've kicked off a system wide update as it's updating a ton of stuff.  I'm going to leave it running overnight and see what we end up with tomorrow...