24 comments

[ 4.6 ms ] story [ 74.1 ms ] thread
Even a kid can program an arduino. Though it's syntax is very C-like, its much simpler to work with.
The syntax is actually straight up C++, though you can also use C code in the Arduino IDE if you give your file a .c extension.
Or if you're bashful when confronted with C syntax, you can use my Node library :)

https://github.com/ecto/duino

Ummm, _really?_ Programming _microcontrollers_ in JavaScript?

I think you just broke my brain…

(So has somebody run Zed Shaw's Fibbonacci sequence code on it yet?)

If you read the docs, he's not programming the microcontroller in JavaScript - just running a native shim on the microcontroller and then communicating via serial. So it's basically a node.js library to use an Arduino as a dumb I/O card for your PC, not to program the Arduino in JS.
It's C++ made to look like Processing, for some reason.
FWIW, it's not "made to look like Processing", it _is_ Processing. They use (or at least built on top of) the Processing IDE.
They are different. Processing is built on Java, Arduino is built on C++.
That's true for the _languages_, but the Arduino development environment is built on Processing, see second para here:

http://arduino.cc/

Arduino was built for the arts community who were already using Processing, allowing them to take what they already knew, and apply it to hardware. That's why it looks like Processing.

Of course, the Arduino board isn't limited to the Arduino programming environment. Hackers tend more towards programming the AVR directly, providing greater performance and environments more familiar to them.

and all the built in stuff is just plain C++ too and can be found in the lib directory.

I really like how easy it is to hack prototypes together with Arduino. I recently moved my own prototypes from PIC24 to a Teensy++ (a tiny little Arduino compatible board) and its made life so easy! Its a lot of fun to play with and the wealth of libraries makes prototyping a breeze. Just today I was tinkering with ultrasonic sensors and with bluetooth modules.

For end products, I'd use C and LUFA for atmels rather than Arduino (or a PIC24 if I want 16bit or some of the other fancy PIC24 features, like 40MHz Fcy on PIC24H! since I have no experience with non-8bit Atmel micros)

(comment deleted)
What a terrible article. It's aimed at teaching people how to use an Arduino, and the point of the article is to give a beginners look into it, yet the disclaimer says it's only about the software side. I'm sorry, but an article about the Arduino should be equally about hardware and software.

The real reason I'm saying this is that his diagrams with the LEDs will not work. The potential across the LED leads is 0. In fact, on the example with 3 chasing LEDs, it may blow the ports (I don't know know if the pin is an open collector or a current source).

Yep, he doesn't seem to have any idea of how a breadboard works. In fact, he's got it completely backwards (LEDs on the power rails and power rails in the component rows). It probably won't blow the ports with the resistors there, but it definitely won't work the way he says it does.

Also, the Arduino IDE already has a serial terminal built in, so all of the Processing terminal handling stuff is moot.

Final point is that running motors from the same supply as the Arduino tends to break down if you put a decent load on them - you'll get brown outs and weird resets.

On the plus side, he does include his bibliography on the last page, so you can check out the original tutorials. That's a pretty decent set of links and books.

I concur, apparently the author forgot how breadboards worked when he fired up Fritzing.

I'm also very confused by the "Arduino IDE" section as the Arduino software includes all dependencies as far as I know.

And "Arduino" doesn't even mean "good friend" ...

Coming from a web developer background, making stuff with the Arduino has been very fun and a nice change of pace.

I'm working on Internet of things projects, generally on the server side, but I decided to try my hand at making an actual device so I made a stationary bike computer that automatically upload workout sessions on Runkeeper:

https://github.com/reefab/CyclingPusher

I'm not sure how many of you actually want to learn Arduino, but for those that do:

http://www.allaboutcircuits.com/

Read it, learn it, live it. I started working through it and even just through the first ~5-10 chapters, you'll be able to understand most electrical diagrams in beginner Arduino projects. This way, you won't be assembling a jigsaw puzzle by pictures - you'll be interpreting the diagram.

Arduino uses C, with a few libraries that you'll get familiar with following any set of beginner projects.

http://arduino.cc/

If you're on the fence, and have ~$80 to spend on a hobby - go for a beginner kit that comes with LEDs and a servo, and resistors, etc. It makes life easier.

I have no idea why, but it's just so damned satisfying.

I have no idea why, but it's just so damned satisfying

I'm an embedded developer and a few years ago I introduced another (web/desktop) developer to simple microcontrollers. His reaction was the same. It's basic programming, but there is something really visceral about making a cylon LED chaser or wiggling a motor back and forth.

That connection to the physical world outside the computer is what's kept me in embedded systems for 20 years.

I'm teaching my kid Java. Does Java for Arduino exist? I don't want to confuse him with disparate languages, even though going to C++ wouldn't be a horrible stretch.

If Java on Arduino isn't a possiblity, are there Arduino-like boards for Java?

Short answer: No and I don't think so, respecitevely. (though there are lots of C#-based boards running the .NET Micro Framework if you bend that way.)

EDIT: Oh, just remembered you can program Lego Mindstorm in Java. Although I don't know how user-friendly that environment actually is, it's not the one Mindstorm comes with.

Long answer: The C++ dialect you use when getting started on Arduino is fairly short on C++-isms and is designed to be simple, straightforward and familiar for people who used the Java-based Processing framework.

So it wouldn't be a big stretch. At a guess I would even say Arduino is very much simpler than Java for a total beginner, talking in terms of number of concepts required to build something simple but useful.

I think your best options are LeJOS (Java for Mindstorms) or the Sun SPOT ( http://www.sunspotworld.com/ ). Both are a bit pricier than the (already overpriced) Arduino, but the Sun SPOT is a lot more powerful computationally.
Sun SPOT sounds really interesting, thanks.

We have Mindstorms and have switched to RobotC from CMU rather than using the graphical programming approach. That works well enough. It seems that all middle and high-school programs that do Mindstorms stay with the graphical programming approach which is a shame because it makes doing anything serious very difficult.

There's Jody Culkin's "Introduction to Arduino" comic as well: http://www.jodyculkin.com/comics-2/introduction-to-arduino

A friend & I used this as a teaching resource for the first part of a 3 hour workshop for non-programmers getting started with Arduino. We found it to be a great teaching resource (although I'm not a teacher and haven't tried any other methods, so I have nothing to compare it to.)