Today I connected old Logitech Webcam C200 to my Raspberry Pi.
I just wanted to capture single
frames (at a specified time interval, say every 10 minutes) and upload
resulting images to wunderground.com
.
I tried to use fswebcam
for that purpose.
BTW a good description of available software for WebCams can be found here.
To install fswebcam
one have to execute:
# apt-get install fswebcam
I run fswebcam
with the following bash
script (borrowed from
Raspberry Pi --
Webcam streaming):
#!/bin/bash OUTPUT_DIR=/var/www/cam/fswebcam-output fswebcam -r 640x480 -S 11 --jpeg 95 \ --title "Sopot/Abrahama Street (PL)" \ --subtitle "View from my window" \ --info "Hardware: Logitech_Webcam_C200@raspberryPi" \ --save $OUTPUT_DIR/image.jpg -q
To display one's images at wunderground.com
one have to
register the camera with a simple form.
The images can be uploaded to ftp account at
wunderground.com
or they can be retrieved from the
public URL. As I have decided to upload them I have got ftp
account credentials upon sucessfull registration
(server and user name). The password is the same as for my
wunderground.com
WWW account.
I upload images withe following bash script borrowed from here:
REMOTE='webcam.wunderground.com' USER='hrpunioCAM1' PASSWORD='#####' FTPLOG='/tmp/ftplog' date >> $FTPLOG ftp -n $REMOTE <<_FTP>>$FTPLOG quote USER $USER quote PASS $PASSWORD bin lcd /var/www/cam/fswebcam-output put image.jpg quit _FTP
Images are produced and uploaded every few minutes---the scripts are executed with appropriate crontab entries.
A link to my webcam at wunderground.com
is here.