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.

Viren

Member Since 25 Dec 2012
Offline Last Active Sep 05 2017 12:03 PM
-----

Topics I've Started

Netduino Plus 2 gives error when using GPIO_PIN_A0 AND GPIO_PIN_D8

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");   }

 

}

 

 


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.