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

Arduino or Netduino


  • Please log in to reply
22 replies to this topic

#1 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 07 September 2010 - 10:37 PM

I am an "amateur" programmer - I like to dabble but I am far from a professional programmer. Most of my efforts are pretty high in the stack (ASP.net, etc using C#). I feel pretty comfortable in VS 2010 and programming against ASP.Net. I have recently decided to address a long-held itch to play with electronics as a hobby (we're talking an almost 30 year itch!). Just to ensure I have the basics covered I am going back to really simple stuff with breadboards, LEDs, relays and the like. But I hope to move on from that quite soon. And so to my question... Arduino looked like and interesting platform for me to spread my wings, once I have a few more of the basics under my belt. I like the fact that there is a flourishing community, shields-a-plenty and so on. But the draw of the .Net environment is strong for me. I'd be interested in opinions as to which want to START with. I'm leaning towards Arduino because a lot of my newbie questions can probably be addressed by existing online content, books and so on. Although I see promising signs, these seem much weaker with Netduino. I'd be interested in thoughts as to the best way to start digging into this stuff. Thanks. Mark

#2 Eric Burdo

Eric Burdo

    Advanced Member

  • Members
  • PipPipPip
  • 130 posts

Posted 08 September 2010 - 12:53 AM

Well, the Netduino hasn't been around as long... but it's off to a good start. The majority of the Arduino shields and components are compatible with the Netduino... and if you can read C# code, you can usually read the Arduino code, and port it to C#. That being said... I have never used an Arduino... I just started into the Netduino myself. I'm a programmer by trade (mostly .NET stuff) and the fact that I can finally use C# is great.
~ Eric D. Burdo ~ http://brick-labs.com/

Today LED's, tomorrow, the world!!! Well, OK, maybe servos.

#3 MattW

MattW

    Member

  • Members
  • PipPip
  • 23 posts

Posted 08 September 2010 - 02:26 AM

Also don't forget to compare the development environments. You can download both of them without a purchase of any hardware. Not putting down the incredible work and result of the Arduino environment, but I personally prefer the Netduino environment. Correct me if I'm wrong, but I believe you can't do step by step debugging with the Arduino, but you can with the Netduino ...

#4 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 08 September 2010 - 02:35 PM

Thank you Eric and Matt for your respective responses. In looking at this a little more I think I am going to do both :-) Once I have got beyond my "basics re-education" (spent last night playing with relays and transistors, etc like a little kid all over again!!!), I will probably purchase an Adruino and some shield (just for the fun of it). But then I figure that for the sake of $35 I can't go wrong by buying a Netduino as well and see where that leads. I am almost certain (hardly even need to look!) that I will much prefer the Netduino development environment so, after I have played with both for a while, it will be interesting to see which one "wins". It seems to me that the challenge Netduino has right now is gaining a certain critical mass in terms of mindshare - books, community, web sites, etc. Get past that point and I hope it has a bright future. By the way, out of interest, to what degree is Microsoft aware of / supporting this? Thanks. Mark

#5 greg

greg

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationChicago, IL

Posted 08 September 2010 - 02:59 PM

Thank you Eric and Matt for your respective responses. In looking at this a little more I think I am going to do both :-) Once I have got beyond my "basics re-education" (spent last night playing with relays and transistors, etc like a little kid all over again!!!), I will probably purchase an Adruino and some shield (just for the fun of it). But then I figure that for the sake of $35 I can't go wrong by buying a Netduino as well and see where that leads. I am almost certain (hardly even need to look!) that I will much prefer the Netduino development environment so, after I have played with both for a while, it will be interesting to see which one "wins".

It seems to me that the challenge Netduino has right now is gaining a certain critical mass in terms of mindshare - books, community, web sites, etc. Get past that point and I hope it has a bright future.

By the way, out of interest, to what degree is Microsoft aware of / supporting this?

Thanks.

Mark


Mark, I would almost say that there's more "mindshare" for the .net micro framework devices than Arduino. Not as much in the hobbyist market yet but in embedded for sure. MS has continued to develop and improve the .NetMF (and much as I hate MS they seem to have done a good job here) and there are a couple of major providers of .NetMF embedded hardware like Secret Labs, GHI and others.

The main "drawback" to .net devices is the fact that it's not a real-time OS. For 98% of what people do with them this isn't an issue but for the 2% where it's an issue it's a REAL issue. Some of that can be taken care of with native code but it's something to think about.

Personally, as a network engineer/software guy, I prefer the .NetMF stuff because it's "easier" for me to work with.

There are also a couple of .NetMF books out there - one from MS called "Embedded Programming with the Microsoft .Net Micro Franework" and the other is "Expert .Net Micro Framework" from Apress. I prefer the second one personally.

#6 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 08 September 2010 - 03:22 PM

Mark, I would almost say that there's more "mindshare" for the .net micro framework devices than Arduino. Not as much in the hobbyist market yet but in embedded for sure. MS has continued to develop and improve the .NetMF (and much as I hate MS they seem to have done a good job here) and there are a couple of major providers of .NetMF embedded hardware like Secret Labs, GHI and others.

The main "drawback" to .net devices is the fact that it's not a real-time OS. For 98% of what people do with them this isn't an issue but for the 2% where it's an issue it's a REAL issue. Some of that can be taken care of with native code but it's something to think about.

Personally, as a network engineer/software guy, I prefer the .NetMF stuff because it's "easier" for me to work with.

There are also a couple of .NetMF books out there - one from MS called "Embedded Programming with the Microsoft .Net Micro Franework" and the other is "Expert .Net Micro Framework" from Apress. I prefer the second one personally.

Thank you Greg. You make a good point about .NetMF and one I had not considered. Your response certainly interested me more in the potential of Netduino. And, of course, some more questions :-)
  • What is the relationship between .NetMF and what I can use on the Netduino? Assuming hardware support, do I get the "full" .NetMF?
  • Although I doubt I'll fall into the 2%, what is a good example of where I'd miss the benefits of a real-time OS?
  • Can you put event handlers in context for me (I am used to this at a higher level, through ASP.Net)? I note that Netduino supports event handlers. Does Andruino not offer this (this would seem like a big deal to me, for detecting pin changes, etc)
  • Can I assume that neither Netduino or Arduino offer multi-threading?
  • Looking down the road a bit, let's say I get into Netduino and then want to do more. What is the logical next step?

Thanks again, Greg.

Mark

#7 greg

greg

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationChicago, IL

Posted 08 September 2010 - 03:32 PM

Thank you Greg. You make a good point about .NetMF and one I had not considered. Your response certainly interested me more in the potential of Netduino. And, of course, some more questions :-)

  • What is the relationship between .NetMF and what I can use on the Netduino? Assuming hardware support, do I get the "full" .NetMF?
  • Although I doubt I'll fall into the 2%, what is a good example of where I'd miss the benefits of a real-time OS?
  • Can you put event handlers in context for me (I am used to this at a higher level, through ASP.Net)? I note that Netduino supports event handlers. Does Andruino not offer this (this would seem like a big deal to me, for detecting pin changes, etc)
  • Can I assume that neither Netduino or Arduino offer multi-threading?
  • Looking down the road a bit, let's say I get into Netduino and then want to do more. What is the logical next step?

Thanks again, Greg.

Mark


I'm sure that Chris Walker will chime in here at some point with a lot more detail. He's a much better source than I am! I'm a simple network guy so I don't pretend to understand a lot of this stuff. :)

1. You can use the full .netMF but not everything is available in the firmware - I know there have been some posts about stuff not currently enabled so I'll let Chris provide details. I may be totally wrong on this point too. :)
2. Think of an event handler as just code waiting to execute. So you define an event handler and then go about your business in your code (threads). If an event is "raised" by the CLR then your handler executes. I believe (and again, I could be wrong) that event handlers spin up their own thread when they are raised.
3. The .NetMF is multi-threaded but it's cooperative (ie, 2 threads don't execute at the same time since the microcontroller isn't multi-core) - but they are distinct threads.
4. Depends on what you want to do - from a hardware perspective Chris Walker has said that Secret Labs is coming out with new products Real Soon Now. You can also look into the Fez line of .NetMF supporting microcontrollers (www.tinyclr.com). There's also no reason why you couldn't have more than one microcontroller in a project - just wire them together so they can talk to each other and keep going. Our biggest thing right now is getting microcontroller boards that actually expose all the IO pins. For example there's a lot more GPIO available on the ATMEL chip that isn't exposed on the board. That's one of the things we're ("we're" being the community) hoping Secret Labs addresses with new products - think of a Netduino mega with a lot more IO pins. :)

#8 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 08 September 2010 - 03:52 PM

2. Think of an event handler as just code waiting to execute. So you define an event handler and then go about your business in your code (threads). If an event is "raised" by the CLR then your handler executes. I believe (and again, I could be wrong) that event handlers spin up their own thread when they are raised.

Thanks Greg - very helpful again. Sorry that I wasn't clear on the event handler question. I am familar with the general concept of the event handler (as I mentioned, I use this a lot in the ASP.Net world). My question was more about whether I should expect this on both Netduino and Arduino. My guess is that the concept of an event handler is a very useful one in the physical computing world to allow a project to respond to external events from sensors, etc. The alternative to event handlers, I would assume, would be to have to loop/poll through pins and then respond by calling subroutines "manually" from the polling loop. If Netduino supports this and Arduino does not then that would be a rather large pull for me towards Netduino, since the event handler approach seems more efficient to me. But I may be grasping at straws - perhaps all such hobbyist platforms support event handers. Can you clarify?

Good to know that co-operative multi-threaded support is available.

Beyond all this, I am really looking forward to coming up with the project idea that will really stimulate my interest. I work better with a "goal" and know I won't get to sucked in with a basic "flahs some LEDs" or "play Whack-A-Mole" type project :-)

Thanks again, Greg.

#9 Ravenheart

Ravenheart

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationBulgaria

Posted 08 September 2010 - 05:10 PM

The way you should look at it is this, if you want to flash LEDs super fast get an Arduino, if you want to more easily develop your applications then get a NETMF device. The only really big disadvantage that NETMF has is that its not real-time and because its interpreted its slower than native code. On the plus side, NETMF uses VisualStudio for its IDE, debugging is a breeze and if you have no experience with embedded devices, NETMF is MUCH more user friendly(and we get meaningful error descriptions when compiling). Personally I have a FEZ Domino and a FEZ Panda(Arduino layout compatible with 60 pins) on the way from TinyCLR.com

#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 September 2010 - 05:11 PM

MarkWill, Greg made some excellent points there [thanks Greg!]. Let me add a few quick things: 1. Arduino is a pretty cool 8-bit platform. Its programming language is "Processing" which is C code with some nice libraries. It abstracts away many of the complications of C for you. But it's still embedded C -- so no step-by-step debugging, no multi-threading, no event handlers, no native string support, etc. 2. If you manage to "max out" on the Netduino boards, there are some [not open-source] solutions out there like the Device Solutions boards that give you more horsepower and more GPIOs. And as greg said, we're taking feedback from the community and have some more Netduino solutions in the works. 3. .NET Micro Framework is more than six years old this year. It's very mature. And it's backed by Microsoft--they're continuing development in earnest and we're continuing to contribute code to it (both Secret Labs and the community here) as well. Chris

#11 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 09 September 2010 - 03:44 AM

Thanks all. I am getting sucked in :-) In fact, so much so that I was going to order a Netduino - until I found out that both US suppliers are out of stock. Which is a bit of a bummer :-( Anyone know when the shortage in the US will be addressed? Or if there are any other suppliers beyond Amazon and MakerShed? One more thing - just to get me started I'd be interested in any suggestions for Arduino shields that might be worth ordering to increase the first impression "wow" factor :-) and happen to work fine with the Netduino. I'm interested in doing something (anything really, initially) beyond just lighting up an LED :-) Mark

#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 September 2010 - 04:50 AM

Hi Mark,

Anyone know when the shortage in the US will be addressed? Or if there are any other suppliers beyond Amazon and MakerShed?

They both ran out yesterday--sorry about that. MakerSHED will be getting more within 2 business days. Proto-Advantage ships to both the USA and Canada (and I've heard that their shipping is very affordable).

One more thing - just to get me started I'd be interested in any suggestions for Arduino shields that might be worth ordering to increase the first impression "wow" factor :-) and happen to work fine with the Netduino. I'm interested in doing something (anything really, initially) beyond just lighting up an LED :-)

You could use the Adafruit GPS shield (and even store data on its SD card using the new v4.1.1 alpha firmware). Check out the Compatible Shields and Accessories thread for a bunch more.

Looking forward to seeing what you build with your Netduino,

Chris

#13 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 09 September 2010 - 05:54 AM

Thanks Chris. I am happy to order from Proto-Advantage. Before doing so, do you know if anyone has documented a basic "shopping list" of stuff I might need to get started? I am thinking I need a protoshield (I read somewhere that the AdaFruit one works fine with Netduino - is there only one such shield or are there different sizes/types). I saw a mention that I'd also need the breadboard (to mount on the protoshield?). Also, if one has a need for multiple shields (all working together) is that supported? I'd be interested in any documentation / threads on how all this fits together physically. Anyway, I am eager to order my Netdruino but want to order anything I might need together to reduce shipping costs (and my patience :-)). Thanks again. Mark

#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 September 2010 - 06:10 AM

Hi Mark, Most of the proto-shields are similar. I don't know of any that won't work with the Netduino. We've used the Adafruit one here. You can stack shields--you just can't use the same pins on different shields. For instance, if you use pin D2 (digital 2) on a shield, you can't also use that pin on a shield on top of it--or you'll get signal collisions. Note that this only applies to stackable shields. Some 3rd-party shields are not stackable, as you'll note in their photos. Chris

#15 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 09 September 2010 - 06:53 AM

Hi Mark,

Most of the proto-shields are similar. I don't know of any that won't work with the Netduino. We've used the Adafruit one here.

You can stack shields--you just can't use the same pins on different shields. For instance, if you use pin D2 (digital 2) on a shield, you can't also use that pin on a shield on top of it--or you'll get signal collisions.

Note that this only applies to stackable shields. Some 3rd-party shields are not stackable, as you'll note in their photos.

Chris

Thanks again, Chris. I bit the bullet and both the Netduino and an AdaFruit protoshield are on their way to me. I'm eager to get them :-)

Thanks.

Mark

#16 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 September 2010 - 06:55 AM

Thanks again, Chris. I bit the bullet and both the Netduino and an AdaFruit protoshield are on their way to me. I'm eager to get them :-)

We'll be here to celebrate your accomplishments along the way :)

Be sure to let us know when you get your gear, your first impressions, etc.

#17 Crispin

Crispin

    Advanced Member

  • Members
  • PipPipPip
  • 65 posts
  • LocationLondon, England, Earth

Posted 10 September 2010 - 12:47 PM

Interesting read - thanks... My initial thought was "Cool, something I can write simple C# in". I have a Netduino and am busy rebuilding a balance 'bot with it (currently runs on Arduino) Overall I think it's a cool piece of kit with the biggest bonuses being the IDE used. I would say, the biggest downer I have with the Netduino is the low sink / source capability of the pins. 8mA per pin IIRC. For all things digital, that's fine but I've used them for other things like the simple LED and using digital pins to power sensors (I can turn them on and off that way). Oh, and it locked up on me the first day I had it. (Don't think it was my fault) but did the age old MS fix: Have you rebooted yet? Some things that would make it great(er): (I know they will come with time) - A "mega" but the inner pins have the same layout as the standard one. This will allow me to use normal shields but still have a mega - Higher current capacity on the pins. - Smaller boards. (My balance 'bot could do with less board and more battery ;) ) Other than that, I do like. :) Oh, and "threading" ability is the best. I can [some would say be lazy and] just do things in different threads. Cheers, Crispin
--
Take a seat, I'll be right with you.

#18 MarkWill

MarkWill

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts

Posted 10 September 2010 - 03:22 PM

I would say, the biggest downer I have with the Netduino is the low sink / source capability of the pins. 8mA per pin IIRC. For all things digital, that's fine but I've used them for other things like the simple LED and using digital pins to power sensors (I can turn them on and off that way).

Can you expand on this a little (bearing in mind I do not have a Netduino - mine is on on it's way - and have never even played with an Arduino).

Is the implication that for "other" boards (Arduino) the current from the pins is often large enough to actually drive sensors and the like but, with Netduino, I'll need an additional power source whenever I have something hooked up to a pin that I'd like to control?

Thanks.

Mark

#19 greg

greg

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationChicago, IL

Posted 10 September 2010 - 03:44 PM

Can you expand on this a little (bearing in mind I do not have a Netduino - mine is on on it's way - and have never even played with an Arduino).

Is the implication that for "other" boards (Arduino) the current from the pins is often large enough to actually drive sensors and the like but, with Netduino, I'll need an additional power source whenever I have something hooked up to a pin that I'd like to control?

Thanks.

Mark


Negative - I use all my sensors powered from the board - most have a Vcc input that you plug into the 5V or 3.3V pin depending (and also into GND). A few sensors will draw power straight from the GPIO pins, and also things like LEDs will do that. But sensors, almost universally, will power from the 5V or 3.3V power bus.

#20 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 10 September 2010 - 03:57 PM

Can you expand on this a little (bearing in mind I do not have a Netduino - mine is on on it's way - and have never even played with an Arduino).

Netduino (AT91SAM7X512) has the following output current capabilities:

  • 16 mA digital pins 2, 3, 7,
  • 2 mA analog pins 0 - 3 (in digital mode)
  • 8 mA other pins
  • 200 mA total DC output current on all I/O lines of the package (absolute maximum rating)
Arduino (ATmega168/328):

  • 40 mA per I/O pin
  • 200 mA total DC current VCC - GND

I'll need an additional power source whenever I have something hooked up to a pin that I'd like to control?

You need a current booster (transistor, power shift register, Darlington array etc.) for Netduino to drive a device that draws more than the pin can provide - for example, you can safely drive a LED at 10 mA on digital pins 2, 3, 7, but you cannot drive (e.g.) 30~50 mA IR LED directly. Always check the datasheet (!)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.