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

Input events


Best Answer kalio20, 19 April 2015 - 05:35 PM

DP09.Interrupt = Port.InterruptMode.InterruptEdgeHigh;

Go to the full post


  • Please log in to reply
1 reply to this topic

#1 kalio20

kalio20

    Member

  • Members
  • PipPip
  • 22 posts

Posted 19 April 2015 - 05:20 PM

Hi again,

 

is it possible to change the input event settings while code is runnin? For example if i try to set Digital Pin 9 as Input event, i need sometimes Port.InterruptMode.InterruptEdgeHigh, but sometimes i need to switch to Port.InterruptMode.InterruptEdgeLow or Port.InterruptMode.InterruptEdgeLevelHigh, i tried to fix my problem like this. 

 

InterruptPort DP09 = new InterruptPort(Pins.GPIO_PIN_D9, false, Port.ResistorMode.PullUp,                                                                                                                                              Port.InterruptMode.InterruptEdgeHigh);
DP09.OnInterrupt += new NativeEventHandler(DP09_OnInterrupt);
 
InterruptPort DP091 = new InterruptPort(Pins.GPIO_PIN_D9, false, Port.ResistorMode.PullUp, 
                                                                                                                  Port.InterruptMode.InterruptEdgeLow);
DP091.OnInterrupt += new NativeEventHandler(DP091_OnInterrupt);
 
DP09.DisableInterrupt();
DP091.DisableInterrupt();

                  

I declared for 1 Input 2 events, and activate them when needed, but ofc i throws errors. Can u help me?

Thanks in advance.

 

 

kalio



#2 kalio20

kalio20

    Member

  • Members
  • PipPip
  • 22 posts

Posted 19 April 2015 - 05:35 PM   Best Answer

DP09.Interrupt = Port.InterruptMode.InterruptEdgeHigh;






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.