17

I am looking at buying a NetDuino for some fun home hobby projects.

Have any of you used it and how was your experience?

Should i look at the Arduino or FreeDuino range instead(or something totally different)?

I decided to stick to the NetDuino due to my C# knowledge, but that is not a requirement.

Thanks

PS. I am not sure if this belongs to the community wiki or not (guidance appreciated).

Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
SetiSeeker
  • 231
  • 1
  • 2
  • 5
  • 5
    What do you want to do with the board? That will affect your choice. – Toby Jaffey Oct 28 '10 at 14:25
  • 3
    The ARM7 microcontroller on the NetDuino and the 8-bit AVR on the Arduino are in a completely different class. It's like you're asking whether to buy a server or a netbook. However, you're slowing down your server by running an ill-suited VM--the performance will be similar, and you're using both tools for the same task. Do you really need that layer of abstraction? – Kevin Vermeer Oct 28 '10 at 18:05
  • @reemrevnivek - "Ill-suited" uh... it is a layer of abstraction, but it's certainly not ill suited (and not a vm, really, either). – Connor Wolf Oct 29 '10 at 05:13
  • Basically, you get the same speed for the same price, but one is waaaay easier to program then the other. – Connor Wolf Oct 29 '10 at 05:13
  • 2
    @Fake Name It looks like netduino (TinyCLR) doesn't have a JIT compiler. So, it *is* a VM/interpreter. http://www.tinyclr.com/faq/#13 – Toby Jaffey Oct 29 '10 at 12:10
  • @Fake Name - As Joby pointed out, it *is* a VM, and I said ill-suited because you're using it to interface with custom hardware, which isn't exactly a strong point of .NET – Kevin Vermeer Oct 29 '10 at 12:56
  • I wasn't aware that interpreters were considered VMs. It makes sense, though. – Connor Wolf Oct 30 '10 at 01:15
  • 1
    VMs are what Smalltalk, Java, Python, etc... run on. It means any abstracted machine, running an instruction set different from the "bare metal". Not just a virtualized PC. – Joe Koberg Feb 12 '11 at 00:20

11 Answers11

16

I love C# and find the productivity benefits of developing in C# with Visual Studio to be a very strong factor in favor of the Netduino. I would not pooh-pooh Netduino because "C# isn't for microcontroller/embedded environments" as other answers here indicate.

You can make great fun projects and learn a lot about connecting different physical inputs and output devices using Netduino just as you can with Arduino or going "bare metal" and doing the direct MCU management of the AVR, PIC, or other microcontrollers.

With that said I am sticking with Arduino for the following reasons:

  • Better community support. Arduino just has way more samples, examples, and a bigger community you can draw upon.
  • Netduino doesn't have a story for going beyond the expensive kit/prototyping approach. Going to implement an interactive art exhibit requiring dozens of microcontrollers running your code? Get ready to shell out $35 each for the Netduinos. With Arduino you can prototype on the Arduino and then implement on a bare-bones MCU-only solution with the AVR microcontroller for under $10 each.

So I would say if your C skills are dusty or nonexistant, you love C# and Visual Studio, and just want to tinker on a few hobby projects that won't need to scale out to where cost becomes a bigger issue, go Netduino.

If you are comfortable in C, or comfortable in getting by in it with the help of code samples and the community, and want to be closer to the metal and look at eventually getting away from the "prototype" approach of Netduino and Arduino, go Arduino to get started.

Pat James
  • 317
  • 2
  • 7
  • 1
    I know this is a bit of an old answer but I wanted to add that since the Netduino is fully open-source (including the hardware) you can buy the uC from anyone and flash the Netduino firmware to it. So you could use the Netduino platform in a production product. – Unkwntech Feb 06 '12 at 21:03
  • "Your C# knowledge is close to useless on an embedded platform anyway, so don't put too much weight on that." -- What a silly thing to say. Netduino is embedded, it rocks, and it is C#... – Jonesome Reinstate Monica Feb 24 '12 at 01:20
11

Your C# knowledge is close to useless on an embedded platform anyway, so don't put too much weight on that.

I'd go with an Arduino or one of the clones, not because .Net is the devil, but because that's what everybody else is using, so you will have a much easier time getting help and mooching off of people's code.

Once you have gotten your feet wet, by all means branch out and try different stuff.

Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
dren.dk
  • 3,512
  • 18
  • 17
  • Are you advocating the Wiring language used on the Arduino, or mooching off of (and contributing to) C code on [avrfreaks](http://www.avrfreaks.net/)? – Kevin Vermeer Oct 28 '10 at 19:41
  • 1
    @reemrevnivek Arduino is just C++ with some libraries. I wouldn't class it as a "language" - it's C++ with a header and footer attached – Toby Jaffey Oct 28 '10 at 19:59
  • Whoops, Wiring is what I meant. – Kevin Vermeer Oct 28 '10 at 20:12
  • I find this slightly odd I would almost take "Once you have gotten your feet wet, by all means branch out " as a suggestion to go with the Netduino to start because the *programming* element should be so much less of an issue - allowing one to develop the "other" skills needed. – Murph Jan 22 '11 at 14:04
  • 1
    Bad comment, dren.dk is simply wrong. I and many others use netduino and C# all day long. – Jonesome Reinstate Monica Feb 24 '12 at 01:21
7

I currently have an Arduino, mbed, and finally, a Netduino at my disposal for development / hobbyist use. I never liked working with the Arduino, perhaps because the editor is not very good, and I'm definitely spoiled as a C# developer. When I received my mbed, I liked development on that much, much better, but debugging is still painful because you have to use print statements to figure out what's going on.

When you're developing a product, or just screwing around, a vast majority of your time at first is spent debugging... and when you are debugging, you want to have breakpoints. I have a very difficult time going back to embedded hardware that doesn't offer any sort of breakpoints.

I don't have experience with JTAG yet, but every micro I've seen up until now (besides the RabbitCore modules) requires it to allow debugging via breakpoints. Imagine my surprise when I hooked up my Netduino today and was able to single step through my code in VS2010! I was extremely pleased by this.

Personally, I would not worry about the footprint size, evils of .NET and Microsoft, etc. etc. I would only care about being able to debug quickly and efficiently, so I can just get stuff done.

Dave
  • 3,800
  • 24
  • 41
5

As a BasicStamp user for almost 20 years and a NetDuino user for only 2 weeks (I've never used a Arduino), I'd say that the NetDuino is a great platform. The two main features that I am enjoying: ease of programming (and breakpoints!) in VisualStudio and the hi-resolution ADC on the board are key reasons. The few Arduino shields that I have tried from SparkFun have worked perfectly with the NetDuino.

AlfredBr
  • 141
  • 3
4

Personally, I'm not a fan of C# or .NET. I'm a C luddite. So, my choice of platform comes down to which has the hardware features I want (flash, RAM, clock speed, number of ADCs, number of timers, etc).

That said, I can imagine C#/.NET being useful for rapid prototyping:

  • String handling will likely be much simpler
  • RPC and object serialization is probably easy. I suspect that you can just push C# objects over a serial link. RPC likely "just works"
  • Portability - .NET is a virtual machine, so code should run on other boards or even on PCs
  • Garbage collection makes many algorithms simpler to implement

Of course, this all comes at a cost:

  • Code footprint is bigger (especially when you factor in the standard libraries)
  • RAM usage is higher (everything's an object, is everything typed?)
  • The garbage collector likely meddles with real-time performance
  • If a hardware feature isn't supported by the .NET libraries, you can't use it (unless you implement the features yourself, for which you'll need C/C++, see comments)

And, most of all, by using your C# skills on an embedded platform you're not really learning anything about embedded devices.

Yes, it'll get the job done - but, where's the fun in that?

Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
  • I wonder how hard it is to patch the .NET libraries used on the NetDuino with a new feature. It looks like they're using C++ to build their .NET SDK, way down in SecretLabs.NETMF.Hardware/Stubs - [source files](http://www.netduino.com/downloads/netduinosdk/NetduinoSDKSource.zip). Sigh. – Kevin Vermeer Oct 28 '10 at 19:49
  • @reemrevnivek Not my idea of fun. If you're patching the runtime, you might as well start out with C/C++ – Toby Jaffey Oct 28 '10 at 19:53
  • 1
    @Joby - I'm a C luddite like yourself, but I just wanted to point out that it was possible - You said "If a hardware feature isn't supported by the .NET libraries, you can't use it", which isn't quite true. – Kevin Vermeer Oct 28 '10 at 20:13
  • 1
    Have you actually seen any benchmarks? It's hard for me to imagine that a 16MHz 8bit runs things at the same speed as a 60MHz 32bit micro. Especially since Arduino libraries slow things down too -- none of it is really optimized for speed either. And it's got objects as well (if not as many as are used in .NET). And is it much different from Arduino? If there's not an Arduino library supporting a feature...you have to implement it yourself (calling out directly to hardware registers etc) – davr Oct 29 '10 at 04:51
  • @davr Edited answer – Toby Jaffey Oct 29 '10 at 12:01
  • "And, most of all, by using your C# skills on an embedded platform you're not really learning anything about embedded devices." You mean "old school" embedded devices, yes? I wish these fast 32bit ARM devices were available when I was younger. – AlfredBr Oct 29 '10 at 13:34
3

I found the mbed to be a marvellous substitute for the Arduino.

The software library is more C++ oriented, complete with all the syntactic sugar of assignment operator overloading. Additionally, a system is set up such that users can publish and document code libraries, which can then easily be searched and imported into projects.

Another good feature is the ability to treat the device as a USB stick, and just put the .bin files straight onto the drive.

Unfortunately, the IDE is comparable to that of the arduino. Also, it's online. This is both really good (can be used on any PC, no installation required), and really bad (can't easily be reprogrammed without an internet connection).

The cost of the board is $60, but they have a sponsorship scheme, where they will donate boards to interesting projects provided progress is documented and source code made public.

Eric
  • 1,073
  • 1
  • 13
  • 24
2

I'm primarily a C# developer. I bought an Arduino instead of a Netduino because of the availability of source code. It wouldn't be easy to integrate Netduino with Arduino electronic bricks because you'll have to rewrite some of the samples from scratch.

Jader Dias
  • 1,963
  • 5
  • 23
  • 27
2

When reading 'C# isn't suitable for embedded platforms', remember that people older than a certain age have already heard that said at least once about 'C' and then again about C++ in their lifetimes...

Of course it's monumentally 'wasteful' of the underlying capabilities of the processor, but the ability to run your idle loop 1000x faster than you need rather than 10x faster than you need never made anyone rich.

  • Idle loops are not relevant. There are some MCU uses where cycles matter, like video signal capturing or generation, making your own oscilloscope, real time FFT analysis of input signal, and many others. You can forget C# for these. On the other hand, if your requirements are more toward making "pc like software just in a small package", then C# and .NET MF are not a bad choice at all... – avra Nov 09 '10 at 08:22
  • 2
    ...For such a experience I would rather choose some linux based embedded ARM board, but that is a topic for some other discussion. THe point is that for someone just entering the embedded world with a C# background, .NET MF is not a bad first step at all. – avra Nov 09 '10 at 08:23
1

If you want to feel the bare metal and for example be able to generate or capture video signal directly, that's where every cycle matters and AVR/Arduino will let you do that. If you want higher level of abstraction, higher level programming and debugging comfort, garbage collector and can live with the fact that like in Windows you don't control everything, then choose NetDuino or FEZ Domino. Since both have ARM in their hearth, I bet that if needed you can kill .NET MF on the board and flash bare metal ARM GCC code directly from some Eclipse like IDE with help of a small JTAG debugger. Investigate a little. The problem might be that if JTAG header is missing, you'll need to do some soldering.

avra
  • 1,872
  • 3
  • 14
  • 21
  • C and C++ aren't good enough for video. You'll need Verilog for that :) –  Feb 18 '11 at 00:53
  • There are at least 10 projects that create video with just software. Most are B/W or gray, but there are even color ones and game systems with just AVR software generated video. OSD projects also exist. There are also few examples of capturing low res video frames with AVR without FPGA. Just google around... – avra Feb 18 '11 at 08:29
  • When I say video I mean 1080p 24bit colour. Can embedded C++ do that? –  Feb 24 '12 at 21:01
0

After a very long hiatus from electronics and programming, I've gotten back into it because of a project one of my sons is doing at university. I learned electronics when tubes were the norm and programming with toggle switches (set address, set data, load, store, in binary) and punch cards. Over the years, I've learned and used each electronic and programming language advancement which took a lot of concentrated effort and time. Consequently, I am so grateful for the advancements in microcontrollers and how incredibly cheap they are, including the development boards such as the Arduino, Netduino, etc. The arguments about Arduino vs Netduino, etc., remind me of the Microsoft vs Apple battles such as command line vs GUI. It doesn't matter which platform, programmiing language, etc., is used as long as it is appropriate to the result.

-1

If .net MF gave libraries that are capable of what pure machine / metal code can do, ...then the only abstraction ( . Net MF) becomes a good one. Apart from taking more footprint and running a GC ( which should make it efficient ?? )

Vijay
  • 1