Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sok
Beginner
912 Views

Intel edison breakout board - pir sensor (GPIO connect)

How can i connect the PIR montion sensor to intel edison breakout board?

(1) connect sensor, intel edison breakout board

I used onoff source of node.js modules

----------------------------------------------------------------

var sleep = require('sleep');

var Gpio = require('onoff').Gpio,

pir = new Gpio(165, 'in', 'both');

pir.watch(function(err, value) {

// sleep.msleep(100);

if (err) exit();

console.log('Intruder detected : '+ value);

});

------------------------------------------------------------------

I received invalid result

Please advise me what to do!!

0 Kudos
2 Replies
idata
Community Manager
27 Views

Hi Steveok,

 

 

Thank you for contacting us.

 

 

I just tested your code with the PIR motion sensor that we have here, and it works fine. The difference is that I'm using the Arduino Breakout board because it supports 5V in its GPIOs.

 

 

So, I think that's the issue that you are having, if you are connecting your sensor to 5V it will generate and output signal of 5V, and it can damage your board, because it supports to 1.8V.

 

 

Personally, my recommendation is to use level shifter to avoid this issue. If the problem persist, please try it on another pin.

 

 

I hope you find this helpful.

 

 

Regards,

 

Leonardo R.
idata
Community Manager
27 Views

Hi Steveok,

 

 

Do you have any updates about this? Did it work?

 

 

Regards,

 

Leonardo R.