Storage Options day-night IP camera
Following on from this thread:- http://arduino.cc/forum/index.php/topic,53498.0.html I bought a storage options day-night IP camera. Excellent value. Lots of functionality see:- http://www.storageoptions.com/products/ip-cameras/indoor/ip-camera Including motion alarm and night vision!
My only criticism is that support a bit poor especially zero support for so called advanced use of the motion sensing alarm output, which I guess is the one some arduino users would want to use. I know I did. However they do say up-front they don't support advanced use. But I though at least they could tell us what each of those terminal on the back are for!
Anyway after contacting Storage Options and getting nothing. I went on and worked it out so I thought to post an example in case anyone else wants a go!.
Arduino sketch below.
My only criticism is that support a bit poor especially zero support for so called advanced use of the motion sensing alarm output, which I guess is the one some arduino users would want to use. I know I did. However they do say up-front they don't support advanced use. But I though at least they could tell us what each of those terminal on the back are for!
Anyway after contacting Storage Options and getting nothing. I went on and worked it out so I thought to post an example in case anyone else wants a go!.
Arduino sketch below.
See the above drawing of the green I/O screw terminals on the back of IP camera. Wire up according to that and just follow the camera's manual for setup of alarms in the camera software.
Code ----------------------------------------------------------------------------------------------
const int IPalarm = 6; // the number of the IP camera INPUT pin
const int ledPin = 4; // the number of the LED pin to attach led with 560 ohm resitor
char flag1 = ' '; // char to store alarm data
void setup () {
// setup the arduino pins
pinMode(IPalarm, INPUT);
digitalWrite(IPalarm, LOW);
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, LOW);
}
void loop () {
if (digitalRead (IPalarm) == HIGH) // if IP camera alarm activated set flag1 to 'i'
{
flag1 = 'i';
}
switch (flag1) { // action according to flag1 (using switch case because I am using lots of different values of flag1 in a bigger project)
// could just use if... else
case 'i': //IP motion alarm was triggered
digitalWrite(ledPin, HIGH);
break;
default: // No alarm
digitalWrite(ledPin, LOW);
}// end of switch case
}
const int ledPin = 4; // the number of the LED pin to attach led with 560 ohm resitor
char flag1 = ' '; // char to store alarm data
void setup () {
// setup the arduino pins
pinMode(IPalarm, INPUT);
digitalWrite(IPalarm, LOW);
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, LOW);
}
void loop () {
if (digitalRead (IPalarm) == HIGH) // if IP camera alarm activated set flag1 to 'i'
{
flag1 = 'i';
}
switch (flag1) { // action according to flag1 (using switch case because I am using lots of different values of flag1 in a bigger project)
// could just use if... else
case 'i': //IP motion alarm was triggered
digitalWrite(ledPin, HIGH);
break;
default: // No alarm
digitalWrite(ledPin, LOW);
}// end of switch case
}