Software and hardware engineering

Wed 15 June 2011 Posted by Matt Williamson in iPhone Apps

Pocket Sentry Caught Some Lightning

I snapped a couple nice photos using my Pocket Sentry app last Thursday during a storm. Here they are:

Pocket Sentry Lightning 1

Pocket Sentry Lightning 2

Wed 13 April 2011 Posted by Matt Williamson in iPhone Apps

Pocket Sentry Motion Cam

I just released Pocket Sentry, a motion activated camera for the iPhone and all other Apple devices equipped with a camera. The key features are:

  • Play a configurable sound when motion is detected
  • Snap a photo when motion is detected
  • Email a photo (in batches) when motion is detected
  • Request a webpage (HTTP Callback) when motion is detected

This is great if you have trouble with your neighbors, like I have, where they walk their dog on your lawn. It’s also good to catch the weirdo digging through your garbage. I originally wrote it as a prototype to keep the cat out of the stroller when we were getting ready for our baby to be born and it worked fantastically as you can see from this early prototype:

Cat Caught

The quality is much better than that now though, here’s a snip from an email in the current version:

Pocket Sentry Email

If you want to implement the callback, here’s a sample in PHP:

<?php
$device_id = $_POST["udid"];
$lat = $_POST["lat"];
$lng = $_POST["lng"];

if(array_key_exists("photo", $_FILES)) {
    $file = $_FILES["photo"];
    if($file["error"] == 0) {
        $size = $file["size"]; // Bytes
        $type = $file["type"]; // image/jpeg
        move_uploaded_file($file["tmp_name"], "/path/to/new/location");
    } else {
        // There was an error
    }
}
?>

Update that code to post the image captured to twitter and then update the callback URL in Pocket Sentry’s settings to that URL and you now have a twitter feed of all the wildlife in your back yard. Have fun!

Page 1 / 1