Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README-ja.md
README.md
image.jpg
index.d.ts
index.js

README.md

PaPIRsVZ

Panasonic's PIR sensor. It is used tot detects humans/animals. This sensor include filters. So Easy to separate signal from noises.

wired(obniz, [signal [,vcc, gnd]])

It has three pins. Connect them to an obniz Board directly.

// Javascript Example
var sensor = obniz.wired("PaPIRsVZ", {gnd:0, signal:1, vcc:2});
sensor.onchange = function(val){
  console.log(val ? 'Moving Something!' : 'Nothing moving');
}

onchange = function(value)

It called when something changed. It humans is closing to a sensor, this function will called with value true. If a humans leaves or if a human stops moving, this function will called with value false. It's fileter works. So called with false after soon called with true.

// Javascript Example
var sensor = obniz.wired("PaPIRsVZ", {gnd:0, signal:1, vcc:2});
sensor.onchange = function(val){
  console.log(val ? 'Moving Something!' : 'Nothing moving');
}
You can’t perform that action at this time.