- Netduino Forums
- → bill.french's Content
bill.french's Content
There have been 260 items by bill.french (Search limited from 27-September 23)
#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)
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)
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)
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
#4169 Deadmau5 mask
Posted by bill.french on 24 October 2010 - 01:01 PM in Project Showcase
#4155 Analog voltage incorrect
Posted by bill.french on 24 October 2010 - 12:04 AM in General Discussion
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)
#4107 Questions about time
Posted by bill.french on 22 October 2010 - 04:27 PM in Netduino 2 (and Netduino 1)
#4080 We have a little Netduino surprise to share...
Posted by bill.french on 21 October 2010 - 11:44 PM in General Discussion
#4038 Forum Topic Text Color
Posted by bill.french on 20 October 2010 - 03:49 PM in General Discussion
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.
#3898 Analog input fluctuations
Posted by bill.french on 14 October 2010 - 05:37 PM in General Discussion
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
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!
#3813 12V Regulated Power Supply
Posted by bill.french on 13 October 2010 - 01:10 AM in Netduino 2 (and Netduino 1)
#3810 12V Regulated Power Supply
Posted by bill.french on 13 October 2010 - 12:19 AM in Netduino 2 (and Netduino 1)
#3772 Features of NetDuino
Posted by bill.french on 11 October 2010 - 06:09 PM in General Discussion
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
#.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
#3619 Analog input fluctuations
Posted by bill.french on 07 October 2010 - 01:25 PM in General Discussion
#3601 Analog input fluctuations
Posted by bill.french on 07 October 2010 - 02:52 AM in General Discussion
#3593 Analog input fluctuations
Posted by bill.french on 07 October 2010 - 12:24 AM in General Discussion
#3589 Analog input fluctuations
Posted by bill.french on 06 October 2010 - 11:18 PM in General Discussion
#3560 Analog input fluctuations
Posted by bill.french on 06 October 2010 - 02:16 AM in General Discussion
#3558 Analog input fluctuations
Posted by bill.french on 06 October 2010 - 12:56 AM in General Discussion
#3556 Analog input fluctuations
Posted by bill.french on 06 October 2010 - 12:21 AM in General Discussion
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
#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)
- Netduino Forums
- → bill.french's Content
- Privacy Policy