Getting Started with Arduino

Hi folks,

Yesterday I had never heard of an Arduino or a micro-controller. You see, I am a novice C programmer (teaching myself through a book), and someone told me on some forums about C that and Arduino would be a fun way for me to practice C with real world applications. I'm not really sure what that entails, but it sounds interesting. Forgive me if this is in the wrong forum section, by the way, I wasn't sure where to put it. I don't know how C is related to Arduino, but I intend to find out, I just don't know where to start. I see on the products section of this website that there are a lot of Arduino's to choose from. Is there one that is more user friendly that others? I saw on the introduction section of this website that Arduino's are cross platform, does that mean all of them? (I'm using Linux 64 bit). I see that there is an installation guide on the getting started section of this website, so I won't worry about that yet, and I assume I will be able to find some basic example programs somewhere out there to try at first. If anyone could give me some tips about purchasing the right Arduino or how I might use it with the C programming language, I would much appreciate it :)

(I'm using Linux 64 bit).

YES see: http://arduino.cc/en/Main/Software

Is there one that is more user friendly that others?

UNO is a good starting board http://arduino.cc/en/Main/ArduinoBoardUno

http://arduino-info.wikispaces.com/

http://arduino.cc/en/Reference/HomePage

SCRIPT_KITTEH: I see on the products section of this website that there are a lot of Arduino's to choose from. Is there one that is more user friendly that others?

If you don't know what you want then you want an Uno.

I'd get a kit. There are lots available, here's a few:

http://arduino.cc/en/Main/ArduinoStarterKit https://www.adafruit.com/products/170 https://www.sparkfun.com/products/11236

Much love to Arduino, but if you're hoping to learn programming in C, I wouldn't use embedded development as your starting point.

Here's where I see the divide. You can learn to program C, but if you're still at the stage where you need training wheels, a computer environment is way more accommodating. You can compile, run, crash, and debug a lot faster when it takes a click or two (or "command or two", if you're a badass 8) ) rather than compiling, uploading to the micro, and then trying to guess at what's going on under the ceramic.

If your goal is to learn to develop embedded electronics, there is no better environment than Arduino, IMHO. That's why I'm here. But... while the language is truly C/C++, some of the C-isms have been hidden from you. If you hope to understand the language itself better, you're doing yourself no favors by glossing over the details.

Plus, there are the many constraints of embedded development -- no monitor (excepting some debug printf's through the serial console), no debugger, very limited memory (you only get a couple KB total), plus the additional burden of having to learn at least simple electronics. That's fine if learning electronics is your goal, but it's unnecessary complexity if you just want to learn to code.

So, IMO: Go learn C. Come back if/when you want to dabble in electronics. Don't get me wrong -- the water's fine here, so don't be discouraged by any of the above if it sounds like your cup of tea. But hang out here because here is where you want to be, not because it happens to use the language you're trying to learn. :D

SirNickity: Here's where I see the divide. You can learn to program C, but if you're still at the stage where you need training wheels, a computer environment is way more accommodating. You can compile, run, crash, and debug a lot faster when it takes a click or two (or "command or two", if you're a badass 8) ) rather than compiling, uploading to the micro, and then trying to guess at what's going on under the ceramic.

Yes, but getting a desktop PC to do anything interesting (like open a window) is a massive job in C.

Modifying the Arduino 'blink' sketch is mild by comparison.

I'll take your word. I've never developed a GUI app in C. But, I think "interesting" is in the eye of the beholder.

I learned the language by learning how to read and play .WAV and .MP3 files from the CLI. The most important thing (I think) for a programmer is to find a project that interests them. That way, the tedious parts are matched with the reward of having it work.

For me, it's music. I studied the RIFF Wave specs (which are awfully ambiguous for such an established format -- there are required workarounds because some established applications are still getting such trivial matters as chunk size word-boundaries wrong), then the MP3 specs (I learned an awful lot about how to properly calculate frame sizes, where most published code seems to just use magic numbers culled from working examples), how to handle a ring buffer, how to interface with interrupt-driven callbacks, how to handle dynamically allocated memory (and how not to!), how to define structures and linked lists...

Looking back, most of these concepts would have been far more difficult to sort out without the copious logging and debugging tools available on a PC. Not having to worry about bumping into memory limitations while I learned more efficient technique was nice too. Just my two cents. ;)