Testing: wiring pressure mat to arduino

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);
  }
}

 

ExampleCircuit_bb.png

Blink

Button

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:

https://blog.arduino.cc/2014/02/24/prototyping-a-pressure-sensor-with-arduino-micro-arduinomicromonday/

Data sheet for PM3 Pressure Mat:

http://www.farnell.com/datasheets/1895123.pdf?_ga=2.105664899.1656863295.1522159471-2011633875.1520956445