Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

PIR interrupt fires exact opposite

sensor PIR interrupt

  • Please log in to reply
2 replies to this topic

#1 Terrence

Terrence

    Member

  • Members
  • PipPip
  • 24 posts

Posted 21 December 2014 - 12:17 PM

pirInterupt 
= new InterruptPort(Pins.GPIO_PIN_D8, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeHigh);

pirInterupt.OnInterrupt += pirInterupt_OnInterrupt;

static void pirInterupt_OnInterrupt(uint data1, uint data2, DateTime time)
{
	Program.flag = true;
	Debug.Print(data1.ToString() + " " + data2.ToString());
}


Netduino Plus 2

Netmf 4.3

VS 2013

 

I have a PIR motion detector sensor attached to my board and it fires continuously.

 

I started waving my hand in front of it and I noticed that it stopped firing.

 

So the interrupt fires when there is no motion and does not fire when there is motion.

 

I have tried this on analog and digital ports.  I have tried reversion the gnd and vlt pins, but that did not fix it.

 

Any idea what is happening?



#2 CT1

CT1

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 21 December 2014 - 10:48 PM

I'm no expert but my PIR uses InterruptModes.InterrupEdgeLow and it works the way I expect it to.

Netduino Plus v1

Netmf 4.2

 

Hope that helped



#3 Terrence

Terrence

    Member

  • Members
  • PipPip
  • 24 posts

Posted 22 December 2014 - 02:05 AM

Ok, I figured it out, I had my pins connected incorrectly.

 

Thank you CT1 for your reply.

 

Terrence







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.