IPM-165
Doppler module for moving obstacle detection.
Below image is InnoSent's module using IPM-165.
wired(obniz, { signal[, vcc, gnd]});
name | type | required | default | description |
---|---|---|---|---|
signal | number(obniz Board io) |
yes | output pin. | |
vcc | number(obniz Board io) |
no | vcc | |
gnd | number(obniz Board io) |
no | gnd |
See pin assign at Datasheet
// Javascript Example
var IPM165 = obniz.wired("IPM-165", {vcc:0, signal:1, gnd:2});
IPM165.onchange = function(voltage) {
console.log(voltage);
}
onchange = function(voltage)
Change callback of output.
It change regarding moving detectino.
// Javascript Example
var IPM165 = obniz.wired("IPM-165", {vcc:0, signal:1, gnd:2});
IPM165.onchange = function(voltage) {
console.log(voltage);
}
[await] getWait()
Read output voltage at onece.
// Javascript Example
var IPM165 = obniz.wired("IPM-165", {vcc:0, signal:1, gnd:2});
const voltage = await IPM165.getWait();
console.log(voltage);
Supported from: obniz.js 3.5.0