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

Member Since 08 Jul 2011
Offline Last Active Jan 01 2013 09:49 PM
-----

Posts I've Made

In Topic: How do you create software events

26 February 2012 - 01:00 PM

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.

In Topic: Cannot Get Clean OnInterrupt Event from InterruptPort

02 January 2012 - 02:03 PM

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?

In Topic: Cannot Get Clean OnInterrupt Event from InterruptPort

02 January 2012 - 01:55 PM

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..

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.