C# language for arduino>

<p>I haven't had much experiencing with arduino circuit boards and C, C#, or C++ programming. Next semester, I will take a mechatronics class. This will involve considerably programming. There will be a project and I'm thinking of using an arduino.</p>

<p>Do you guys know if C# can be used to program an arduino or is it limited to C and C++?</p>

<p>Only reason I'm asking is that I've heard C# is becoming more popular than C/C++. I'm not sure if the source is credible or not. Since I will be learning a language, I want to learn one that will be widely used and a nice skill to have in the future.</p>

<p>Just use C++. The language is based on C so might as well learn that. I have never used it, but just looking around that’s what it appears to me. </p>

<p>[Arduino</a> - Reference](<a href=“http://arduino.cc/en/Reference/HomePage]Arduino”>Arduino - Home)</p>

<p>C# may be gaining popularity but most hardware level stuff is done in C / C++. This is because it’s faster and takes up less space (technically).</p>

<p>C is a lil trickier since things that are done automatically in other languages, you have to do yourself in your program. But its a small language and you can learn it quite fast. A good intro C++ book teaches you the C components anyway, so thats why I say just start off with C++.</p>

<p>If you’re interested in programming micro controllers, you need to learn C. I currently work in embedded systems and it’s basically all C (with a smattering of C++).</p>

<p>I recommend learning C, first. C++ is a giant, many-armed swiss army knife of a language that takes many years to master.</p>

<p>Oh okay. </p>

<p>I was originally planning on learning C, but I changed my mind to C++.
If I were to just learn C++, how long do you think it would take? I know this will be different for everyone, but just a rough estimate would be nice. I am off for winter break so I got some time to spend for about 5 weeks learning the language.</p>

<p>If you have prior programming experience, you could be writing non-trivial programs within a matter of days. Admittedly, you’ll be referencing documentation a lot and you probably won’t be writing things the “best” possible way, but you will be able to get things done.</p>

<p>If you’re learning C++ as your first programming language, it will take several months before you can do meaningful things. Honestly, I don’t think C++ is the best language to start off with if you’re learning programming for the first time. A higher-level language (e.g. Python or Ruby) is an easier way to get introduced to basic concepts.</p>

<p>There’s a class of devices called the “netduino” that are programmed with C#. I own one. It is easy to use, but it is slow. It uses a much better microcontroller but is much slower than an AVR because of the overhead of the .NET micro framework.</p>

<p>Avoid them and learn C in the first place.</p>

<p>So I guess learning C is what most of you suggest.
Would a simple book from the library work or should I purchase a book teaching C?</p>

<p>Also, do you have to purchase the software or do you have to buy the program?</p>

<p>“The C Programming Language” by Kernighan and Ritchie is the best choice to start out with, IMO. It’s written by creators of the language, themselves, and it clearly and systematically teaches you most things that you need to know.</p>

<p>One of my CS friends recommended that I use jGRASP as the environment. </p>

<p>Since he’s a CS major, I’m not sure if this environment would be good for engineers as well. </p>

<p>What do you guys think?</p>

<p>I’ve never heard of jGRASP before, but most of the features it advertises seem sort of useless to me. Also, it appears to be very Java-centric. An application programmer working in Java may find some of that useful (although I doubt it), but a systems level C programmer won’t be using an “object viewer” or UML class diagrams or any of those things.</p>

<p>Still, I understand that setting up a build environment can be very confusing for beginners, so if your friend can help you learn how to use jGRASP, I think it’s probably an OK choice.</p>

<p>The K&R book was the first book written for C…in the 70’s. There have been updates and a newer book should be used. (It’s 2012 afterall). </p>

<p>I like Programming in C by Kochan. It really walks you through the language and was far easier to learn from for me. </p>

<p>jGrasp is fine to learn, but if you are going to continue learning in school then get Visual Studio. You will be able to get a copy of it for free from the Microsoft Dreamspark program if your school is a member.</p>

<p>There was a second edition published in 1988! And IMO it’s still relevant and a good book. C hasn’t changed /that/ much.</p>

<p>jGRASP really is meant for Java. I agree that Visual Studio is a better alternative (or gcc/vim!).</p>

<p>Sweet, I have a dreamspark account so I can get visual studio for free.</p>

<p>Do you guys think I can learn enough about C to program an arduino over winter break (1 month) spending probably a couple/few hours a day. I know this is vague and dependent on the person, but a rough estimate would be nice.</p>