Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Al Williams

Dr. Dobb's Bloggers

Scratching the Arduino Itch

October 21, 2013

I do a lot of work with local schools, talking about engineering, ham radio, rocketry, robotics, and — of course — embedded systems. Depending on the grade level, some of the kids are already pretty experienced programmers (especially, for some reason, with Java). But the younger kids often don't have any programming expertise.

I'm no expert in how to teach children, so I'm not sure what the right way is for kids to acquire programming. However, I know what has been done. A lot of people my age first learned BASIC (which wasn't my first exposure to programming, but I did my share of it). BASIC introduces a lot of bad habits, but it is also both a high-level abstraction (compared to, say, assembly language) and a low-level abstraction (compared to C++ or Java). I've used variations of BASIC with some success in robotics classes. You can learn it pretty quickly, and if you provide some canned subroutines, the students can get some quick results.

Some of the younger kids (and some of the older ones, too) have been exposed to graphical block-like programming languages. Usually, they've run into the Lego Mindstorms NXT-G language. Some have even used a similar system from MIT called Scratch. Scratch was the foundation for the Android App Inventor (something I talked about some time ago) and, to come full circle, you can use Scratch to program Mindstorms.

Of course, the current darling of introductory embedded systems is the Arduino, and these are showing up more in school programs and projects. Wiring sketches (programs, really; I hate calling them sketches) are really just C++ programs with a few stock functions, a class library, and a very odd build system. Of course, it isn't terribly difficult to master the Arduino and the class library is convenient.

Although I know it will irritate the faithful, I'm always mindful that the Arduino is really just an Atmel CPU and a bootloader. All the other stuff is just PC software. With that in mind, there are a few options for using potentially kid-friendly software with the Arduino.

Dr. Dobb's has a long history with Tiny Basic, and there is a Tiny Basic for the Arduino. For a tiny language, there are quite a few features available, and while it doesn't have the features of a Basic Stamp, it is a credible system for getting kids to write code on the Arduino.

For the graphical crowd, there's S4A. This is Scratch for Arduino. It isn't exactly a programming language. It is actually a bit of code that runs on the Arduino and communicates with a Scratch program using a protocol that updates inputs and outputs every 75 milliseconds. The program doesn't actually run on the Arduino, but uses the Arduino as a peripheral device.

I like working with young people on engineering projects. It is a way for me to pay forward the people who helped me. Besides, I might have to hire some of these kids one day! Even if a young person never actually becomes a practicing programmer, it is valuable to get the logic and problem-solving discipline that a programming project provides.

Speaking of teaching programming, you might be interested in Small Basic from Microsoft. There is also a site dedicated to teaching programming to kids, and, as mentioned earlier, Scratch. None of these are aimed at embedded programming directly, but they are still useful for building understanding that could be a foundation for more embedded pursuits.

Related Reading

More Insights

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.