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 01-July 23)


By content type

See this member's


Sort by                Order  

#7231 Doing a PIC's Job

Posted by bill.french on 07 January 2011 - 08:22 PM in General Discussion

Thank you for the explanation!

but I wanted to use a netduino mini since I have a fair understanding of C# and I'm pretty sure that doesn't run on 3V

I think you could get away with 3v on the mini, on the 3.3v pin.

Also, this site I think has a lot of "in car" stuff, like this:
http://www.mini-box....8&category=1264

...which you might think about using with a small lead-acid battery. Just throwing stuff out there.

Good luck with this!



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



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



#7024 StepGenie (An EE's Best friend?)

Posted by bill.french on 04 January 2011 - 11:44 PM in Netduino 2 (and Netduino 1)

Cool, thank you.



#7000 StepGenie (An EE's Best friend?)

Posted by bill.french on 04 January 2011 - 08:43 PM in Netduino 2 (and Netduino 1)

No, you'd hook a unipolar (with 6 wires) up to pins 5,6,7,8. The remaining two wires go to your powersource, possible through a power resistor first.



#7053 StepGenie (An EE's Best friend?)

Posted by bill.french on 05 January 2011 - 03:56 AM in Netduino 2 (and Netduino 1)

Ok... I'm still stuck on the fact that your wife got you a StepGenie for Christmas. That's awesome!!

Did she get you the full demo board or just the chip itself?


LOL... she was very grateful to receive a Google spreadsheet with part numbers from me this year. I was grateful to receive fewer sweaters. :D



#7007 StepGenie (An EE's Best friend?)

Posted by bill.french on 04 January 2011 - 08:57 PM in Netduino 2 (and Netduino 1)

I'm looking myself! My wife got me a bi-polar for Christmas, so... I either need to find a unipolar, or build the circuit to handle the bi-polar using a h-bridge.



#7509 StepGenie (An EE's Best friend?)

Posted by bill.french on 12 January 2011 - 12:10 PM in Netduino 2 (and Netduino 1)

OK, here's a video of the stepgenie in action using LEDs:
http://www.youtube.com/watch?v=KjkVbNI8YBI
The code looks like this:
        public static void Main()
        {
            OutputPort d0 = new OutputPort(Pins.GPIO_PIN_D0, false);
            while (true)
            {
                d0.Write(true); //send a "step" to the StepGenie -- basically just a pulse
                d0.Write(false);
                Thread.Sleep(250);

            }
        }

It's wired up like this:
pins 1,2,12 -> 5v (from netduino)
pins 3,13,14 -> ground (from netduino)
pins 5,6,7,8 -> 220ohm resistor -> led -> ground
pin 11 -> D0 on the netduino

With this setup, you can move pin 12 from 5v to Gnd to switch directions; pins 2,3 can be moved to try different modes. Or, connect them up to digital ios on the netduino and change them through programming.

Hard to follow picture of the circuit: (I ran out of 220 ohm resistors so I used a blue potentiometer on one of the leds...)
Posted Image



#8643 Coding style discussion

Posted by bill.french on 28 January 2011 - 11:39 PM in General Discussion

i vote Chris Walker deletes all posts in this thread (including this one) that do not contribute to (or at least encourage) the achievement of safe netmf quardoflight.



#8171 Coding style discussion

Posted by bill.french on 23 January 2011 - 02:44 PM in General Discussion

Edit: Actually there is one other thing, what is DDD?: this http://www.gnu.org/software/ddd/?


my guess was this: http://en.wikipedia....n-driven_design

... i've added it to my extensive list of things to read about.



#6992 StepGenie (An EE's Best friend?)

Posted by bill.french on 04 January 2011 - 04:24 PM in Netduino 2 (and Netduino 1)

for testing, i wouldn't put the modes on a digital IO yet, it would be one more complicating factor. I think 4 wires means bipolar and it won't work (easily) with the step genie, you want a 6-lead. http://www.probotix....ipolar_bipolar/



#7454 StepGenie (An EE's Best friend?)

Posted by bill.french on 11 January 2011 - 02:09 PM in Netduino 2 (and Netduino 1)

Hey there. I just noticed your private message, sorry! I also stumbled across my step genie still setup w/ LEDs in a breadboard; i will post a picture tonight for you.



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



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



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



#6979 StepGenie (An EE's Best friend?)

Posted by bill.french on 04 January 2011 - 01:13 PM in Netduino 2 (and Netduino 1)

I got a stepgenie for Christmas, my wife said it came quickly, and it was packed very well. Strange. You can definitely use the digital ios to set the various values high or low (1 or 0). To test it, i would start with LEDs. Tie pins 1,2,3 to +5v -- 13,14 to Gnd. 11 and 12 to digital ios, and 5,6,7,8 to leds through resistors and LEDs (no mosfets). Everything else (4,9,10) can be left open. This should put you in "Hi-torque" mode. Depending on pin 12 (DIR), if it is high or low, the lit leds should shift "up" or "down" when you toggle pin 11 (STEP). I didn't save my code, but i just toggled a digital io and paused 200ms so I could see it. Then, I played with pins 2 and 3 to try out the different modes. One lesson I learned (which was the point, really!) was the difference between unipolar and bi-polar steppers. I got a bi-polar stepper for Christmas, but the stepgenie is designed for unipolar...



#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



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



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



#5595 Proper LED Circuit

Posted by bill.french on 01 December 2010 - 05:21 PM in Netduino 2 (and Netduino 1)

You got it working with a motor as I remember -- have you substituted the motor with an LED, now? It should work, assuming you have the LED oriented properly? I would start using any output port, such as D0, which is the most upper-right pin on the netduino. Once you get it working, then move on to PWM. I see you are in NYC, do you have a car? I'm joining a hackerspace in Highland Park, NJ, which is about 1/2 way from NYC, id be happy to get together and work on some stuff. Your previous thread: http://forums.netdui...ch__1#entry4823




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.