Initial test begins from the simple button on/off switch that turns on thr LED light on pin 13.
Code below:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
} else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
Blink
Button
Notes on how to install a pressure mat:
The mats as supplied have four connection wires at one corner; two are the alarm circuit and the other two are the tamper circuit. The two tamper wires can be identified using a continuity tester - they should form a circuit. Physically fit the mat as follows.
http://www.diy-alarms.co.uk/pscatalog/modules/blocknews/item.php?item_id=17
Some other posts in a relevant field:
Data sheet for PM3 Pressure Mat: