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.

bill.french's Content

There have been 260 items by bill.french (Search limited from 05-June 23)


By content type

See this member's


Sort by                Order  

#4038 Forum Topic Text Color

Posted by bill.french on 20 October 2010 - 03:49 PM in General Discussion

I highlighted in red examples of what is rather hard for me to read, on pretty much any computer I use, even one with an Apple Cinema display... of course, if the forum is fine for you, the below image probably looks fine, too, and I sound crazy.

I'm fairly young, have healthy eyes, and use decent monitors, but it does annoy me slightly. The rest of the site is very attractive.

Posted Image



#4080 We have a little Netduino surprise to share...

Posted by bill.french on 21 October 2010 - 11:44 PM in General Discussion

F5 F5 F5 F5 ... GRRR!



#4107 Questions about time

Posted by bill.french on 22 October 2010 - 04:27 PM in Netduino 2 (and Netduino 1)

I've read these two threads: http://forums.netdui...rch__1#entry514 http://forums.netdui...rch__1#entry650 My basic question is: what does the netduino know about time, and how can I access it? I (think I) know there's no RTC (real time clock), but there is a RTT (real time timer) which is fine, but what ways to get access to accurate time? Can events be raised by timers? Most of the samples I've seen deal with timing through thread.sleep.



#4111 Questions about time

Posted by bill.french on 22 October 2010 - 05:11 PM in Netduino 2 (and Netduino 1)

Cool. Is your stopwatch sample still applicable? It uses Microsoft.SPOT.Hardware.Utility.GetMachineTime().



#4155 Analog voltage incorrect

Posted by bill.french on 24 October 2010 - 12:04 AM in General Discussion

Check the actual voltage on the aref. If you're running only off USB, I have found that it could be off a significant amount if your usb voltage is low for whatever reason.

You can also use the .SetRange(0, 3300) on your pin method to get the millivolt conversion "for free". I'm guessing if your aref is actual at 3.26 or something you could do .SetRange(0,3260)...

Also check this thread on the LM35

I'd be curious to know about fluctuations in your readings, which I have been struggling with:

Analog Input Fluctuations



#4169 Deadmau5 mask

Posted by bill.french on 24 October 2010 - 01:01 PM in Project Showcase

I am guessing he's using the phone simply as a source of music, so yes, in a sense, he is controlling the colors from the phone, although fairly indirectly.



#4286 Analog voltage incorrect

Posted by bill.french on 27 October 2010 - 04:49 PM in General Discussion

It sounds like you got it working, but you mention earlier that you're running the sensor off of 3.3v, the LM35 spec says: - Operates from 4 to 30 volts So perhaps that is an issue? You do need to be careful not put put more than 3.3v to the analog input, but from what I gather about the LM35 (10mV/degree C) that should not be an issue.



#4293 .Net, Fred's webserver, and me

Posted by bill.french on 27 October 2010 - 11:26 PM in Netduino Plus 2 (and Netduino Plus 1)

Fred (and Others) Web Server

As someone who understands but tries to avoid ternary operators, because they scare when I try to read code, I think I am really close to understanding everything that is happening in the listener.cs file -- any suggestions on how to work through it? I need the "dummies" version before I can tackle the MSDN version that deal with the concepts. I feel like I need some help getting to the next level with .Net. I think my questions mostly deal with IDisposable and/or disposing of objects. Even suggesting a class from MS where this stuff can be learned would be appreciated.

My basic questions:
1. What is IDisposable all about? I see here that it's important to know about it
2. What's up with the ~Listener piece? Here's a fun discussion of the tilde. Reading that made me say: WUT JUST HAPPENED HERE?
3. I have heard before that using() (as in, using (ClientSocket)) does something special, like disposes of the object when it is done, is that true?
4. "#region IDisposable Members" -- what is up with the #region stuff?
5. Why are we dealing so explicitly with disposal of stuff at all? Is it for performance reasons? Or should we not trust things to get disposed of on their own?

Forgive me if these questions are dumb. I've been working with .net for years now, and basically avoiding these questions. The basic stuff I've done over the years works, and I can't figure out how or why to learn about this stuff -- but the smarter folks all seem to do it so it must be important, and not just stylistic choices. I've done some pretty cool things over the years but I'm guessing my code looks like it's written by a 4 year old. Thank you!



#4295 .Net, Fred's webserver, and me

Posted by bill.french on 28 October 2010 - 02:22 AM in Netduino Plus 2 (and Netduino Plus 1)

I think my question is more technical than it might have come across. My oop is pretty good, i am weak on threading, and building disposers in the context of a GC is mysterious to me.

My understanding about why you might build your own disposers is when you're dealing with unmanaged code, or threading issues, or if you want to dispose of stuff in particular order for particular reasons -- otherwise the garbage collector takes care of its business pretty well.

So, in short, while I can read and understand the IDisposable interface, i'm struggling to understand why people use it in fully managed code situations outside netmf, and particularly with our nd+, what about the listener.cs code calls for the use of IDisposable?



#4298 .Net, Fred's webserver, and me

Posted by bill.french on 28 October 2010 - 03:12 AM in Netduino Plus 2 (and Netduino Plus 1)

This is like c# therapy.. thank you!

I like this explanation on using and IDisposable -- does that sound about right to you?

I've also figured out that the #Region stuff is not a requirement, just a nice way to structure the code, right?

Should you have "GC.SuppressFinalize(this);" as in here? Or is that not applicable in netmf?

Reading the webserver code, I am understanding how it's non-blocking -- but is it multithreaded? There's certainly threads involved, but to make it multithreaded, it seems that once you got a clientsocket, that should be spun off into it's own thread (which would deal with the response) so that the next connection could be accepted? I don't doubt that I'm misunderstanding this. Am I missing something?

Thank you so much for your time!



#4301 .Net, Fred's webserver, and me

Posted by bill.french on 28 October 2010 - 03:25 AM in Netduino Plus 2 (and Netduino Plus 1)

Phantom, besides having some hilarious comments, your linked articles seem to argue against working so hard to explicitly dispose of objects c++ style, just when I was starting to get into it w/ c#. What I linked above seemed to argue for IDisposable in the context of exceptions and future-proofing, which I can get behind.

Most of what I've written in the past only dealt with exceptions as a bad thing that end a program, I do know that I need to explore using exceptions in positive ways, somewhat similar to events.



#4302 .Net, Fred's webserver, and me

Posted by bill.french on 28 October 2010 - 03:29 AM in Netduino Plus 2 (and Netduino Plus 1)

ourt post timing seems to be crossing... lol i appreciate your regions link, too. Concerning GC.SupressFinalize -- in your opinion would it be appropriate in the webserver? Why or why not?



#4315 .Net, Fred's webserver, and me

Posted by bill.french on 28 October 2010 - 12:20 PM in Netduino Plus 2 (and Netduino Plus 1)

Damn, I hate posting code online.

Please please please don't stop!! Certainly not because of anything I've said! You're a hero in my book.

Wow, thanks everyone, I have read every word and I think I get it. My original post was primarily about tricking smart people into teaching me something I probably should have already known, for free. However, a part of me hopes I'm not alone and that it might be useful for someone else.

I also think this discussion really reveals how awesomely powerful the netmf is -- i can't imagine the competing platforms are having these types of discussions. I am certainly capable of understanding these things, but the subtleties of the implementation are tough, or at least, unobvious. (A tilde means what??)

I have been thinking about the using statement (and IDisposable, but not as much - and only tied the two together in the last 24 hours) for at least 5 years. I've read what it does, but have never gotten to the "but, why?" part. This line in the .net wiki sums up my frustration:

You should be familiar with the pattern or with the interface because it's a basic thing to know about the .Net framework.


Basic thing to know?? Why? I've read many books and created .Net applications that (admittedly small numbers of) people are actively using on a daily basis and never touched/actively avoided it.

I learn much better when there's a practical application involved, and the nd+ web server seemed like a perfect opportunity for me to bring myself forward with code I otherwise understand.

Concerning the multithreading, I agree that how it is done is probably the most appropriate. Threading is also something I'm trying to wrap my head around, so I'm happy to see i've gotten myself to the point of identifying it... how to make it multithreaded (or if it even should be) i will leave up to you all, but maybe I'll tackle it.

So, am I getting this right:
The point/advantage of having Listener implement IDisposable is so others can now call it in a using() (since using() requires the IDisposable interface) and trust it to clean up after itself. Does the IDisposable stuff also get called if, at some point in Program.cs, webServer = "null"? I think "yes".

Thank you, all, again.



#4331 .Net, Fred's webserver, and me

Posted by bill.french on 28 October 2010 - 11:09 PM in Netduino Plus 2 (and Netduino Plus 1)

This has been great for me.

Corey, if I can get a little more time from you, or anyone else:

But you may be wondering why the link you posted has such complicated code. The answer is that Bill Gates is much smarter and richer than you and me, and therefore he has thought very hard about the difference between finalization and disposing. The rules are subtle and complicated (by the way, the link you posted also has it a little bit wrong)


Is the issue in:
        ~DisposeObject()

        {

            Dispose(false);

        }

? It seems this finalizer doesn't do anything, and based on what you said:
1. It should call CleanUp()
2. CleanUp() should deal with only unmanaged stuff
3. managed stuff should be handled in the if(disposing) block

Thanks, all, again. --Bill



#4334 How to utilize full range of Analog Input

Posted by bill.french on 29 October 2010 - 12:04 AM in General Discussion

I'd be curious to know how to do this, too. My thoughts: 1. I believe you can use the aref to reduce the ceiling, so if you gave aref 2.2v instead of 3.3v, you could get 0-1023 mapped to 0-2200mV, which is a little better. 2. I don't believe you can raise the floor on the built in ADC... i think you'd need to use a differential adc for that? Or, what about this: (i have no idea if this would work at all) 1. Run j1 through a diode -- i wonder if the .7v drop across the diode would get your output from 1.6-2.2 to .9-1.5v? 2. Feed 1.5v to aref then, your 0-1023 would map to 900mV to 1500mV? IF that works, maybe two diodes? I suspect there's not enough current moving for the diodes to work. This is all wild guessing on my part.



#4356 Netduino at PDC 2010 (or watch online)...

Posted by bill.french on 29 October 2010 - 11:04 PM in General Discussion

managed to miss the whole thing... ugh, anyone have a link yet??



#4361 Netduino at PDC 2010 (or watch online)...

Posted by bill.french on 30 October 2010 - 12:37 AM in General Discussion

Thanks, Raven, for the link. I love this stuff!



#4362 .Net, Fred's webserver, and me

Posted by bill.french on 30 October 2010 - 12:39 AM in Netduino Plus 2 (and Netduino Plus 1)

Awesome, thank you, sir. Maybe in a couple weeks I can buy you a roast beef, mutz, and gravy sandwich when i'm in hoboken next.



#4381 HXT 900 Servo

Posted by bill.french on 31 October 2010 - 12:29 AM in Netduino 2 (and Netduino 1)

www.hobbycity.com has lots and lots of servos at very low prices.



#4393 Where to find these connectors?

Posted by bill.french on 31 October 2010 - 11:36 AM in General Discussion

This is probably not exactly what you're looking for, but maybe? They are Ampmodu connectors, you'll commonly see them as the internal audio connection for a cdrom drive:

Posted Image

-- but they come in lots of different sizes, are keyed, and available from mouser:

mouser catalog page

One disadvantage, possibly, compared to what you posted is the jacks are usually 90 degree to the pcb. Here's an arduino shield with a bunch of the connectors as an example:

Posted Image



#4449 Deadmau5 mask

Posted by bill.french on 03 November 2010 - 09:10 PM in Project Showcase

So.... How did the costume work out??



#4547 MFToolkit - new release (VS2010 support / .NET MF 4.1)

Posted by bill.french on 07 November 2010 - 12:02 AM in Netduino Plus 2 (and Netduino Plus 1)

Is there a link to just what exactly the above MFToolkit is? I was not able to find a site that stated a simple overview of what it is and why it exists. Thanks!



#4562 2D Motion Capture, early results

Posted by bill.french on 07 November 2010 - 04:52 AM in Project Showcase

While I was admiring your project, and your strategic use of .Dispose(), I couldn't help but think the displayed frame from your youtube video looked like you were trying to punch Beaker, but missed.

Posted Image



#4565 2D Motion Capture, early results

Posted by bill.french on 07 November 2010 - 05:37 AM in Project Showcase

Glad you enjoyed my very advanced Paint.Net skills!

Thinking about it (the project) some more, the datasheet says 5us is "typical"... (and since you say you got the pwm call wrong anyway) which makes me wonder if you could have gotten away with something like:

out1.Write(true);
out1.Write(false);

which, according to here, gets you a 60us pulse.

... I also wonder if you had gpio pins to spare, you could you one pin in output mode to fire the pulse, then another pin in input mode (both tied to the sig pin on the ping thing) to read the returning pulse, then you wouldn't have to worry about .Dispose()'s timing.



#4580 MFToolkit - new release (VS2010 support / .NET MF 4.1)

Posted by bill.french on 07 November 2010 - 02:08 PM in Netduino Plus 2 (and Netduino Plus 1)

Very awesome, thank you!




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.