Channels ▼

Al Williams

Dr. Dobb's Bloggers

Total Eclipse of Arduino

December 02, 2012

I have frequently said disparaging things about Arduino. This invariably prompts e-mails from Arduino fans, some thoughtful and some… let's just say heated. I knew the situation was bad when I saw a Slashdot comment on an Arduino book that mentioned something about "Arduino haters like Al Williams…" (keep in mind, I was not involved in any way with the article or the discussion).

More Insights

White Papers

More >>

Reports

More >>

Webcasts

More >>

I'd like to say that I really like the Arduino. I'd like to say that, but I just can't. My recent port of lwos (which I will get back to next time) reminded me of just how much I don't like it. But wait — if you are a fan, don't stop reading to send me a nasty e-mail yet. Wait until I get to the end.

Excepting the religious wars about emacs and vi, I am a pretty moderate guy. So, in all fairness, I do like some things about the Arduino. I like that it has brought a new awareness to embedded controllers. I like that it has spawned a lot of cheap daughterboards (don't make me say shield) and clones that can fit them. I really like the Atmel CPUs — in fact, I was using GCC, Atmel, and a bootloader long before the Arduino showed up. The best thing I like is that there are a number of really cool libraries for the Arduino and that makes it very productive (although I also liked Pascal Stang's avrlib library, which had a lot of cool features too and also predates Arduino).

So, gee, that sounds pretty positive. What don't I like? Ok, I'll be honest. Part of my personality is that rabid fans of almost anything puts my guard up. Even the things that I really like, I can (and will) enumerate a long list of flaws that I wish were different. So when you tell me that some tool is perfect (except, of course, emacs which is the exception that proves the rule), I am instantly going to be suspicious.

On the other hand, I'm no fool. If something really is that great, I will get over it and get with the program. But nearly every time I use the Arduino it leaves me frustrated. I say nearly every time. I did some work this semester with a high school student and he wanted to read an IR remote in Java. We built a board, put the Arduino bootloader on it, and instantly found a really nice program on the Internet that did exactly what we wanted. No fuss. But it also wasn't the core of the project.

I recently built an Arduino library for the IDE and also ported lwos to it. The editor is handy, but if you are used to a real programming editor it is frustrating. Sure you can use another editor (and sure, I can make the same argument about many IDEs). But the editor is really super simple and while that's a good thing for a new person, it is frustrating otherwise.

The other thing that is strange is that the IDE doesn't compile your code like you would guess it does. It basically builds a big single C++ file and compiles it. It guesses (mostly correctly) what libraries you need. Mixing in C code is very ugly. C++ is a little easier, as long as you don't want to use any of the Arduino libraries in your code.

Yes, every one of these problems is surmountable. But it is an unnecessary hoop to jump. The real tool underneath is GCC and there is no reason you can't have an "expert" mode with some better editor features and more control over the build process. I get that the tool makes it easy for beginners, but it would be nice to not make the old timers cranky. Besides, it isn't just the old timers. Every beginner will eventually graduate to bigger projects and find the same stumbling blocks.

Last time I mentioned a link to instructions on how to build Arduino code with Eclipse. To tell the truth, I'm not a huge fan of Eclipse (did I mention I like emacs?) but it is certainly capable and well-known. It also has good integration with Atmel debugging tools so, unlike the Arduino IDE, you could actually debug what you write.

Nevermind that link. It was out of date and the instructions no longer worked (assuming they ever did). I did a search and found quite a few instructions that involved doing things like compiling a program in the IDE and then swiping a library file made for the project. That sounds ugly. I wanted to just use Eclipse.

I did a few experiments with the AVR plug in. My code would build, but something kept it from running properly. Then I found the Arduino plug-in here. After you get it set up properly, it manages to build a library for your target and lets you write your Arduino code with Eclipse. There is even a serial monitor view so you can interact with the Serial object in your program.

I like it. Of course, even things I like might have an issue or two. In this case, I wish there were better documentation for the plug-in, and installing it seems to double up with the standard AVR plug-in (I assume the author uses the same base). There are few spots on the website that hint that the plug-in only works on Windows, but then later notes mention that starting with version 1.2.4, it works with Windows, Linux, or OS X. It is running fine for me under Linux.

I can get cheap Arduino hardware. I don't especially dislike the bootloader. I do like the libraries. With this plug-in I can ignore the IDE and the wonky build process it uses, which is really the part I hate. Maybe this plug-in will let me love the Arduino, after all.

One thing I am interested in, by the way, is the Arduino Leonardo. I'll be talking about it soon, but it is interesting because it can impersonate USB HID devices (a topic I've talked about before with the PIC). If building an HID device is as easy as the rest of the Arduino libraries, that would be something to get excited about. Especially if I can dump the hokey IDE.

Related Reading






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Comments:

ubm_techweb_disqus_sso_-b51f7a869a1175412e56da18be4810cb
2012-12-13T03:27:22

I've noticed that too. Some of the instructions that worked with earlier versions didn't work with the latest. Do you think it is intrinsic to Eclipse? I haven't done much integration of other things to the Eclipse ecosystem so I'm not sure.

That's part of the problem with opaque build processes (which Eclipse is guilty of too). I typically use an "external make file" project and manage the build myself. Granted, not good for someone getting started, but it is nice to have that option that you can graduate to.


Permalink
ubm_techweb_disqus_sso_-b51f7a869a1175412e56da18be4810cb
2012-12-13T03:25:12

I'm big on education, working with several local schools on STEP and PLTW initiatives. I don't disagree that something like this is important for that market. But there are lots of plug and play hardware with robust libraries. Sure, NOW, the Arduino has plenty of hardware and software options because it has more critical mass than everything else. Same way Windows has lots of great apps. But it didn't start that way. And from a purely educational view, I hate to teach kids about "sketches" and "shields" when no other part of the industry uses that language. It would be like teaching basic computer skills but referring to the mouse as a "slider" and the keyboard as a "letter typer" -- you could do it, but it creates an artificial barrier to the next step. Same for the build process. I applaud anything that makes it easier for me to build projects. But it shouldn't be so opaque that a pro can't figure it out in a few minutes.

Subtracting the critical mass factor, there's nothing intrinsically better about Arduino than many other similar products out there. In some ways, there are those that are superior. I don't think wishing for a product that offers more upward mobility--especially when it is the entry point for many young people--is out of line. Simple is good, but give the kids who will excel a simple path to migrate into the real world if and when they are ready.

Thanks for sharing your thoughts.


Permalink
ubm_techweb_disqus_sso_-c585701b5a76476a1ec2a1d188ebccaa
2012-12-12T14:02:34

Trying to get Eclipse to work with anything other than the built in stuff has been an exercise in frustration for me. If you do get it to work, next update it usually all breaks. You really don't want to use Eclipse unless you absolutely have to. :-)


Permalink
ubm_techweb_disqus_sso_-49ca14f274acceb24dd844633050e906
2012-12-11T23:00:47

Arduino is an entry point for this generation of techies wanting to get down to the lowest level and understand how things work. I see it as the replacement for what I grew up with, the ARRL Handbook. As a learning tool it offers the possibility of seeing a seeker of knowledge internalize a basic concept such as a register or addressing modes. As far as I'm concerned, this is as important as getting to those conversion points in study of math or sciences; it will stay with the learner for life.

If you thought it was supposed to be the adult Lego toy for building usable "products" then you were ill informed or misled. Take it for what it is and avoid the whining attitude.


Permalink
ubm_techweb_disqus_sso_-b51f7a869a1175412e56da18be4810cb
2012-12-06T01:46:15

Ah! I didn't watch the videos because I have so little quiet in the office ;-) I couldn't find it in the written docs, but I should have watched the videos.


Permalink
ubm_techweb_disqus_sso_-9d6c4fda09498d3f0a6efd20ffce0243
2012-12-05T13:38:01

you probably missed this one http://eclipse.baeyens.it/seri...
Best regards


Permalink
ubm_techweb_disqus_sso_-b51f7a869a1175412e56da18be4810cb
2012-12-05T13:32:47

Hi Jantje, thanks for your great work. Well, the documentation is full of pictures which is helpful. But, for example, it took me a minute to figure out how to get to the serial monitor. I presume you are developing features faster than you can document them ;-)

Then again, maybe I overlooked it.

Thanks again for providing this. Nice job.


Permalink
ubm_techweb_disqus_sso_-0cd02431100cced55cb6ba2793570183
2012-12-05T12:41:43

Have you tried to use Netduino instead?

You get to use Visual Studio, provided you're ok with C#.


Permalink
ubm_techweb_disqus_sso_-9d6c4fda09498d3f0a6efd20ffce0243
2012-12-04T17:33:03

Hi
I'm jantje; the author of the Arduino eclipse plugin.
I would like to thank you for the "I like it.".
I would also like to know which documentation you feel is missing.
I feel it is pretty good documented but I may overlook some things so sharing your input/experiences on a more detailed level could benefit the whole community.
Best regards
Jantje


Permalink
ubm_techweb_disqus_sso_-1283a0bbe145f12cbe37f1ed603b9228
2012-12-04T15:14:28

You can use Visual Studio as well!

http://www.visualmicro.com/


Permalink
ubm_techweb_disqus_sso_-b51f7a869a1175412e56da18be4810cb
2012-12-03T20:54:35

To get started, the IDE is not a bad per se. But it is somewhat limited and if you start trying to do more exotic things it gets old fast. Next time I'll have some creative solutions that others have found to circumvent the IDE when you outgrow it.


Permalink
ubm_techweb_disqus_sso_-92d9a0020a9a018d96cc59edb6a768da
2012-12-03T14:07:21

Just bought a mintduino on Saturday and began building it with my son. We'll soon be building our first project and interacting with the IDE so thanks for the heads up on the difficulties.


Permalink


Video