Netduino home hardware projects downloads community

Jump to content

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


Member Since 10 Jan 2011
Offline Last Active Jan 04 2017 05:24 PM

Posts I've Made

In Topic: Netduino send ICMP Ping ?

01 April 2014 - 09:02 AM

To get back to this issue, I've tested Colin's 3 source files he posted above on the Netduino Plus 2, and it works. However, when the network is not available, an exception gets thrown instead of a false being returned.


Successful pings return a true though, so this is definitely a solution.


Perfect, so we'll know:


I'm alive, remote dead
I'm alive, remote alive,

I'm dead

In Topic: Input Debounce

07 June 2013 - 07:01 AM

I set up my software debounce like this:  

	static long lastDebounceTime = DateTime.Now.Ticks;          static long debounceDelay = 100000;   //adjust as necessary	public static void Main() {		InterruptPort input = new InterruptPort(Pins.GPIO_PIN_D4, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeBoth);        	input.OnInterrupt += new NativeEventHandler(input_OnInterrupt);	}	 	static void input_OnInterrupt(uint data1, uint data2, DateTime time)        {            if ((time.Ticks - lastDebounceTime) > debounceDelay)            {                           lastDebounceTime = time.Ticks;		// do stuff            }        }
Thanks everyone for the help.



Some micro optimisation :) The exact time the interrupt occured is already given, no need to call DateTime.Now.

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.