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.

onedumbtrucker

Member Since 08 Aug 2011
Offline Last Active Jun 14 2016 06:54 PM
-----

Topics I've Started

ND3 cannot seem to create an interrupt handler

13 June 2016 - 10:22 PM

Hi All,

 

Having a strange issue again with the ND3.

 

This code worked fine on my ND+ but will not work on my ND3

        public static InterruptPort button = new InterruptPort(Pins.GPIO_PIN_D0, false, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLevelHigh);


        public static void Main()
        {
            try
            {
                button.OnInterrupt += new NativeEventHandler(button_OnInterrupt);
            }
            catch (Exception EX)
            {
                Debug.Print(EX.Message.ToString());
            }
..........

public static void button_OnInterrupt(uint data1, uint data2, DateTime time)
        {
..........

 

 

 

When I debug it throws an argument exception for "button.OnInterrupt += new NativeEventHandler(button_OnInterrupt);" every single time. Have tried hundreds of little changes and tweaks and I could swear it actually worked a few times but cannot figure out what I am doing wrong.


2 projects, 1 works, 1 gives hardware error

02 June 2016 - 07:06 PM

Hey all,

 

Wondering if anyone has any ideas about this. I have two different projects, both created for the Netduino3 Ethernet.

 

One is a simple blinking light for testing hardware and I can deploy and run it fine.

 

The other is the actual application I am developing and it worked the first couple times after I created it. (copied source code from an ND+ project). But now for some reason everytime I try to deploy I get the following message.

 

"Error 1 An error has occurred: please check your hardware. "

 
But if I switch over to my blinking light project I can deploy it fine.
 
 
One thing to note, I found I have to use the firmware updater tool to erase the application from the ND3E to switch projects. But that doesn't explain why one works and one doesn't.
 
I may try building the project from scratch again.
 
The only other difference I can see is that I included a reference to System.IO in the project that doesn't work.

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.