Sunday, 8 May 2011

Digital Infrared motion sensor

This is a simple to use motion sensor. Power it up and wait 1-2 seconds for the sensor to get a snapshot of the still room. If anything moves after that period, the 'alarm' pin will go low.
  • Type: Digital
  • Supply Voltage:3~5V
  • Current:50μA
  • Working temperature:0℃~+70℃
  • Output level(HIGH):4V
  • Output level(LOW):0.4V
  • Detect angle:110 Degree
  • Detect distance:7 meters
  • Size:28mm×36mm
  • Weight:25g


InterruptPort  PIR = new InterruptPort((Cpu.Pin)FEZ_Pin.Interrupt.Di13, false, Port.REsistorMode.PullDown, Port.InterruptMode.InterruptEdgeHigh);
PIR.OnInterrupt += new NativeEventHandler(doSomething);

static void doSomething(uint port, uint state, DateTime time) {
    //do something, turn on led, write file, ecc

No comments: