Code Coffee: Prototyping with Arduino

Adam Coates gave us an introduction to the Arduino platform on Monday 25th June. It’s an open-source hardware kit for rapidly (and cheaply) prototyping electronic control systems, and seems to be pretty simple to use. Adam brought in a couple of boards that had suffered fiery deaths at the hands of a rogue motor for us to inspect, as well as a functioning one which he was using to drive an LED. There are different types of board, depending on what exactly you want to hook it up to – for example, you can get an extra “shield” board that allows you to connect a wireless module. Pre-assembled boards are readily available for purchase from many locations, and cost in the region of £20-£50, but all of the boards have open hardware specifications, which means that you can build them yourself if you like.

Coding for the Arduino seems to be quite simple. The controller on the board itself seems to be relatively limited, in that it only has a small amount of memory and is somewhat slow. For more computationally-intensive operations, the idea seems to be to use the Arduino as an interface between a full-size computer and your hardware rather than as a standalone controller. Simple operations, like blinking an LED, can be achieved in only a few lines of code, with very little boilerplate. Adam showed us the serial interface, which is used to upload code onto the board, and can also be used in an interactive mode for communicating with it.

From what I’ve seen of it, the Arduino documentation appears to be excellent; certainly, the hardware looks to be well-documented, and there’s a good amount of example code available. And there are plenty of things that you can do with it – Adam uses it to test a telescope turntable driver, I think. I’ve not quite figured out what I’d use one for myself (my Raspberry Pi is still in its box too…), but an idea that was floated during Code Coffee was reproducing the groundbreaking Holmberg lightbulb N-body simulation. Now that would be cool.

About Phil Bull

I'm a theoretical cosmologist, currently working as a NASA NPP fellow at JPL/Caltech in Pasadena, CA. My research focuses on the effects of inhomogeneities on the evolution of the Universe and how we measure it. I'm also keen on stochastic processes, scientific computing, the philosophy of science, and open source stuff. View all posts by Phil Bull

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: