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.

VipX1's Content

There have been 6 items by VipX1 (Search limited from 17-April 23)


By content type

See this member's

Sort by                Order  

#24694 How do you create software events

Posted by VipX1 on 26 February 2012 - 01:00 PM in General Discussion

You would indeed use an event, but not in the .NET 2.0 way of using public event EventHandler<SomeEventArg> MyEvent;

The equivilent in NETMF is


    public delegate void MyEventDelegate(object sender, MyEventArgs e);
    public event MyEventDelegate MyEvent;


:rolleyes:

Thanks guys, that delegate declaration is exactly what I needed and I was scrolling threw various .NetMF sites and blogs but couldn't find it. Then I thought everyone who got a Netduino had this situation...

Am I right in saying that the EventHandler must be executed this way because .NetMF doesn't support Generics?

Cherrs, VipX1.



#22345 Cannot Get Clean OnInterrupt Event from InterruptPort

Posted by VipX1 on 02 January 2012 - 02:03 PM in General Discussion

Another Question; At present I can only see the Lap times in the Debug output of Visual Studio. I want to be able to see the lap times without Visual Studio running in debug. How can I connect in Real-Time the the Netduino. If I use a web server configuration I will have to reload the page almost constantly to get rapid updates which is no good. Has anyone ever used Endpoints on a Windows Form that Netduino hits post event? Every time a new lap time came in the Netduino would fire off a packet to the Windows Form and the Windows Form would in turn add a new entry to a listView. Is there any reason why this set up wouldn't work?



#22343 Cannot Get Clean OnInterrupt Event from InterruptPort

Posted by VipX1 on 02 January 2012 - 01:55 PM in General Discussion

Hi there - happy new year!

I'm not an expert on the software side of inputs and interrupts.

However on the hardware side, I think you might be having a problem with switch contact bounce.

Thats where a fast digital circuit registers several transitions as the contacts of a switch come together. Basically the contacts don't snap together cleanly in one go - they bounce.

To rule this out as the cause, can you connect your 555 output directly to the Netduino input? (Voltage & hardware allowing)
Alternativly, add a new thread to your code that waggles an output pin eg D1 and connect it to your D0 pin.

Then monitor the events and see if the problem goes away.

If it does, you need to look at software (or hardware) to filter out the extra pulses when using the relay.

Paul


Thanks Paul and Many Happy Returns! ;)

I took the relay out. I used the 5Vdc that originally powered the relay to instead power a transistor that allowed my Netduino to see 0Vdc when the transistor was powered. It works brilliantly and is exactly what I wanted.

With out a doubt the problem was caused by Contact Bounce from the relay. I have learned something knew too.

My build is a IR sensor on a scalextrics track that measures the lap time each time the car passes the sensor. Notably it only works with one car at present because the sensor looks across the track. If it looked up on a single lane I could measure the lap times of both cars.
I used the TimeSpan type to measure the lap times so I can see the smallest differences in the lap times. It funny trying to scrub half a thousands fraction of a second of the lap time..



#22323 Cannot Get Clean OnInterrupt Event from InterruptPort

Posted by VipX1 on 01 January 2012 - 09:43 PM in General Discussion

static InterruptPort iPort = new InterruptPort(
						Pins.GPIO_PIN_D0,
						true,
						Port.ResistorMode.PullUp,
						Port.InterruptMode.InterruptEdgeBoth );
iPort.EnableInterrupt( );
iPort.OnInterrupt += new NativeEventHandler( iPort_OnInterrupt );
static void iPort_OnInterrupt( uint data1, uint data2, DateTime time )
{
	if( data2 == 1 )
          Debug.Print( counter++ + ".) " + data2.ToString( ) );			}

When I short Digital I/O pin zero to GND I get Data2 == 0, that is great and what I want.
BUT; when I remove the short I get between 3 and 5 open and close events. e.g. 1010101

I'm shorting zero to GND threw a relay which is held closed for 200 milliseconds via a 555 timer so as to remove human error on the physical switch event. I have tried it free hand with a piece of wire also.

Am I doing something wrong. Surely it is possible to cleanly measure a closing contact on the Netduino.



#15269 .brd schematic files, what reader program.

Posted by VipX1 on 09 July 2011 - 04:29 PM in General Discussion

There are several schematic files available to download on the downloads page of the Netduino site. I downloaded them and extracted them and got .brd files post extraction. What is the reader program for a .brd file? When I used Google I found filecrop but I can't find a reader on that site.



#15234 Debug via Ethernet connection

Posted by VipX1 on 08 July 2011 - 07:13 PM in Netduino Plus 2 (and Netduino Plus 1)

I asked this in the Chat already. I understand it is a big undertaking but maybe somebody has achieved it. Is it possible to deploy a new project to the Netduino plus and debug it, i.e. using F5? Is it possible to manually deploy an application to the Netduino plus using MFDeploy.exe?




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.