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 27-September 23)


By content type

See this member's


Sort by                Order  

#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!



#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?



#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!



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



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



#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



#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().



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



#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!



#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



#3898 Analog input fluctuations

Posted by bill.french on 14 October 2010 - 05:37 PM in General Discussion

Is this applicable to the Netduino? (From the Arduino playground linked above)

For any unused ADC input pins, it's best to set their pullup resistors so they don't mess with
the others (pinMode(myPin, INPUT); digitalWrite(myPin, HIGH)).




#3864 Analog input fluctuations

Posted by bill.french on 14 October 2010 - 02:08 AM in General Discussion

Well, I've made some progress on my analog input fluctuations.

I borrowed a Rigol DS1052E -- the screen capture is below. I'm still trying to figure the scope out, I've never used a digital one before.

Anyway, is seems only on external power, there's fairly regular pulses of noise on the 3.3V line, regardless if the source is a battery or my 12v regulated supply.

I built the noise reducing circuit in this article, using an inductor and a bunch of caps:

http://www.arduino.c...Lib/Thermistor4

That is the blue line in the picture... so I've at least filtered it out, now, but my readings of the thermistor are certainly slowed.

Any ideas where the pulses are coming from and how to eliminate them, besides the inductor, etc?

Thanks!
Posted Image



#3813 12V Regulated Power Supply

Posted by bill.french on 13 October 2010 - 01:10 AM in Netduino 2 (and Netduino 1)

Great, thanks for the reply. Am I safe to assume all the grounds on the netduino are the same? And that the Vin is tied directly to the inner pin of the power input? Also, is is safe to have external power and be hooked up to usb for debugging? Thanks!



#3810 12V Regulated Power Supply

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

I my quest to solve my analog input issues, I have dug out my somewhat decent "12V" regulated power supply that I have had luck with in the past -- which actually puts out 13.8V. Anyway, the netduino's specs call for 12V, but can it handle 13.8V? It would be good to know for this application as well as automotive applications since most 12V auto systems run around 13.8V, too. Come to think of it, it seems most 12V supplies I have come across put out a bit more than 12V. Thanks!



#3772 Features of NetDuino

Posted by bill.french on 11 October 2010 - 06:09 PM in General Discussion

Perhaps you're already on this road, but when the getting started guide comes out, if it could be in a wiki or some other community-editable format, that would be great. If you need a suggestion for wiki software, I like the Screwturn wiki, it's very simple, open source, and .net based.

Full disclosure: I'm listed as a contributor to the Screwturn project, but my contributions were more by accident than intentional...



#3653 Analog input fluctuations

Posted by bill.french on 08 October 2010 - 02:03 AM in General Discussion

Ok I took some measurements and notes:

#.5V...3.3V.VIN.....Powersource
1 4.73 3.29 1.26....PC USB - short cable
2 4.22 3.26 1.08....PC USB via long cables and usb hub
3 4.99 3.30 11.79...Lipo Battery
4 5.05 3.29 1.56....Motorola Droid USB Charger


The only scenario where the analog input has been stable (+/- 1 step) is #2... oddly enough.

I still don't have a scope, so this is the best I can do at the moment.

As a recap, I have a wire going from 3.3V to Vref, and a voltage divider using a 47K resistor and a thermistor. I also have three LEDs for indicators. Attached is a badly drawn schematic.

Any more suggestions? Thanks!! --Bill

Attached Thumbnails

  • adc.PNG



#3619 Analog input fluctuations

Posted by bill.french on 07 October 2010 - 01:25 PM in General Discussion

No scope (it got stolen years ago... very sad day for me) but certainly a multimeter. The measurements I remember for 3.3V were 3.29V and when using the lipo battery, 11.9V on Vin. My multimeter is pretty cheap, but the readings were always steady. I might be able to borrow a scope tonight to take a deeper look. edited to add: using a usb power brick is another great idea!



#3601 Analog input fluctuations

Posted by bill.french on 07 October 2010 - 02:52 AM in General Discussion

Man were you wrong! I'm not in Colorado, near a ski slope, OR skilled! Can't even get a thermistor circuit to work.



#3593 Analog input fluctuations

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

Nope! I'm in central NJ. No ski resorts close by that I'm aware of. I'll have to update my profile, there are a couple Bill Frenches out there, some more famous than others. The most famous alive that I'm aware of created Laplink. I'm not that guy, either!



#3589 Analog input fluctuations

Posted by bill.french on 06 October 2010 - 11:18 PM in General Discussion

I have tried a trimpot with the same results. Reading is acceptably stable using usb on my Sony computer. Using an external power supply (a battery), with or without usb, the readings are all over the place. I have tried both A0 and A5. Setrange won't work as i need as much precision as I can get. Power supply can't matter as it glitches when using a different batteries. Any more thoughts? Thanks!



#3560 Analog input fluctuations

Posted by bill.french on 06 October 2010 - 02:16 AM in General Discussion

Trimpot is a good idea, I will try it. I first tested the analog inputs using one, but was not looking for stability, just movement up and down. I just packed up for the night so it will have to wait until tomorrow. I've tried a variety of consumer wall wart 12v power supplies, an 11.1V li-po that was running at about 11.9v, and the last thing I tried before I packed up was a duracell 9V, with the same results.



#3558 Analog input fluctuations

Posted by bill.french on 06 October 2010 - 12:56 AM in General Discussion

I'm seeing fluctuations +/- 4 'steps' if that is a sensible way to describe it. For example: if the reading should be "610" out of 1024, it is varying from 606 - 614, rapidly. On one of my computers, using only usb power, it fluctuates 1 step, which is fine - but not how I need to use the board. I'm not concerned about the accuracy, but "repeatability" is important. At first I thought it was a noisy power supply, but using a battery (with or without usb) has the same results. If for some reason it might be relevant, I do not have anything plugged into the network jack.



#3556 Analog input fluctuations

Posted by bill.french on 06 October 2010 - 12:21 AM in General Discussion

Hello! I am trying to read a thermistor based temperature probe, but the analog input fluctuates too wildly to be useful for my application. I am using a netduino plus that I obtained from maker faire, in case that is somehow relevant.

Any suggestions?

Some notes:
1. I have vref tied to the 3.3v pin
2. I am using a 47k resistor in my voltage divider, with one end to 3.3v, one to ground, and the analog input in the middle
3. The circuit runs are as short as physically possible, with the longest wire (besides the thermistor probe's actual cable) no longer than the distance between 3.3v and vref.
4. Using an external power supply makes the problem much worse - with our without usb hooked up
5. I've tried several external power supplies including rechargeable batteries
6. I've tried also tying all the other analog inputs to ground just in case

I vaguely remember reading somewhere to do something to an analog input pin before using it as an input, but I cannot find that post and think it might be for some other microcontroller. Using a multimeter, the voltage seems much more stable than the analog input would suggest.

Any ideas would be appreciated! Thanks, --Bill



#3470 Pointless fun: Morse Code Interpreter

Posted by bill.french on 04 October 2010 - 04:29 PM in Project Showcase

if you've never seen this video, it's mildly entertaining -- Morse Code vs. Text Messaging:



#3347 Netduino Plus Unable to connect to from MFDeploy or Visual Studio after loadi...

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

Great, thank you for the update, I have verified adding "Thread.Sleep(1);" to the demo works!




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.