Netduino Plus 2 gives error when using GPIO_PIN_A0 AND GPIO_PIN_D8 - General Discussion - Netduino Forums
   
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

Netduino Plus 2 gives error when using GPIO_PIN_A0 AND GPIO_PIN_D8

InterruptPort GPIO Pin OnInterrupt Event GPIO_PIN_A0 GPIO_PIN_D8

  • Please log in to reply
No replies to this topic

#1 Viren

Viren

    New Member

  • Members
  • Pip
  • 3 posts
  • LocationAhmedabad, GJ, India

Posted 28 March 2013 - 02:14 AM

Dear all,

 

From yesterday I face one problem and still I am struggling. Seeking anybody help in this regards. I got an error An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll. After some trial and error I found that suppose I change PIN number (i.e, instead of A0 if I use A1 or etc. and instead of D8 etc.) it is working fine. So, why we can not combinate A0 and D8. This is limitation or something wrong.

 

Kindly Help.

 

 

Viren  

I am using N+2 and the sample code in as below.

 

 

using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino;

 

static class Module1 {

  public static void Main()   {   // write your code here   InterruptPort testport = default(InterruptPort);   InterruptPort loop1 = default(InterruptPort);   testport = new InterruptPort(Pins.GPIO_PIN_D8, false, ResistorModes.Disabled, InterruptModes.InterruptEdgeHigh);   testport.OnInterrupt += new NativeEventHandler(testport_OnInterrupt);   loop1 = new InterruptPort(Pins.GPIO_PIN_A0, false, ResistorModes.Disabled, InterruptModes.InterruptEdgeBoth);   loop1.OnInterrupt += new NativeEventHandler(Loop1_OnInterrupt);   Thread.Sleep(Timeout.Infinite);   }

  private static void testport_OnInterrupt(uint port, uint state, DateTime time)   {   Debug.Print("Test Port");   }

 

  private static void Loop1_OnInterrupt(uint port, uint state, DateTime time)   {   Debug.Print("Loop");   }

 

}

 

 

Attached Files







Also tagged with one or more of these keywords: InterruptPort, GPIO Pin, OnInterrupt Event, GPIO_PIN_A0, GPIO_PIN_D8

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.