Announcement

Collapse
No announcement yet.

Raspberry Pi Netwwork Camera

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Raspberry Pi Netwwork Camera

    I just figured out how to add a raspberry pi with the camera module to UltraNetCam HSPI. At the default 5MB resolution, I am able to get about 1 snapshot every 2 second. The detail is pretty amazing at the default resolution :-)

    Parts List:
    • Edimax EW-7811Un 150 Mbps Wireless 11n Nano Size USB Adapter - $10
    • Raspberry Pi Model B Revision 2.0 (512MB) - $40
    • Protective Case / Box / Enclosure Black Color for Raspberry Pi - $13
    • SanDisk Extreme Pro 8 GB SDHC Class 10 UHS-1 Flash Memory Card 95MB/s SDSDXPA-008G-AFFP - $21
    • Raspberry Pi camera module - $25
    • Raspberry Pi camera mount - $4.95


    Here is a good tutorial in getting nginx installed:
    http://www.youtube.com/watch?v=I_2yGGPus90

    Here is the snapshot.php web page:
    PHP Code:
    <?
    ob_clean();

    header("Cache-Control: no-cache");
    header("Content-Type: image/jpeg");

    #
    # /sun/shm is a temporary world-writable shared memory
    #
    $snapshot = "/run/shm/img.jpg";

    if ( file_exists($snapshot) ) {
      unlink($snapshot);
    }

    $cmd = "/usr/bin/raspistill -o $snapshot -t 0";
    exec($cmd);
    if ( file_exists($snapshot) ) {
      header("Content-Length: " + filesize($snapshot));
      readfile($snapshot);
    }

    ?>
    Also make sure you run:
    sudo chmod 777 /dev/vchiq

    I am not sure why the above command does not survive a reboot.

    For UltraNetCam, you'll need to add a new Type:

    NetCam Vendor: Raspberry Pi
    NetCam Module: JPEG
    NetCam Snapshot Path: /snapshot.php

    For the device, simply add:

    NetCam Name: Raspberry Pi
    NetCam IP Address: The IP of your Pi
    NetCam Port: 80
    NetCam Model: Select Raspberry Pi [JPEG]
    User Id: admin
    User Password: admin

    Have fun!

    EDIT: I was able to shrink the image down a bit to match the Foscam cameras. I am now getting about 1 snapshot per second (similar to the Foscam cameras) using the following command:

    /usr/bin/raspistill -hf -vf -w 640 -h 480 -o $snapshot -t 0

    Regards,
    Ultrajones
    Last edited by Ultrajones; July 27th, 2013, 05:37 PM.
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR
Working...
X