Tag Archives: Arduino

First impressions of LinuxConf Australia #lca2011

Beautiful morning at #lca2011

Well now. Here I am on my first visit to Australia, primarily in order to speak this week at LinuxConf Australia 2011 (a session on Lightweight Messaging for smarter devices on Friday, for those interested).

Given the serious disruption to Brisbane over the past two weeks, the organisers have done a superb job of re-jigging the entire event: changing venues, sorting out accommodation, reorganising the transport plans, catering, etc etc. Stunning. Although we may not be in the location that was originally intended, I’m really impressed by the way things have come together, so a huge thanks to the whole team.

Brisbane

After a lengthy flight and visiting some different parts of Brisbane with some family in the area on Sunday, I hit the conference proper on Sunday evening with registration followed by a talk for newbies by Rusty Russell. Useful advice: “don’t be a fanboy”…. tricky when you’re a techie Linux geek at a conference with Ted T’so, Linus Torvalds, Jeff Waugh and too many others to mention… but, I’m doing my best 🙂

Some brief early impressions:

  • there is simply too much to do / see / hear! I spent all of day one at the Arduino miniconf, which was great… although I’ve played around with Arduinos before, I’d never built one from scratch. It worked!
  • Brisbane is a lovely city. The weather has been just about OK for me so far, although when I left the UK on Friday it was 0C and now it’s in the high 20s! The flood water has receded and the clearup is ongoing but the city is getting on with things.
  • there has been great wifi coverage… by far the best I’ve ever encountered at a conference. Spread between the conference venues, the accommodation (several km away), and enough for many geeks with multiple wireless devices! Why can’t every conference manage this?
  • are a lot of photos hitting Flickr…. the only thing that frustrates me is that most are not open for tagging / people tagging. Please open your pictures, particularly those from events, for tagging.
  • I’m also hoping that more people will start to use Lanyrd for aggregating write-ups, slides, photos etc.

Follow more from the conference via Twitter, check out my photos… a live stream of some of the sessions should arrive soon.

Prototyping – Arduino and Ubuntu

UNO

My Arduino Uno board, via instagr.am and iPhone, on Flickr

One of those things I’ve been meaning to getting around to doing for ages is to explore this exciting new world of prototyping and hacking my own hardware devices together. A lot of my fellow eightbars and of course many of the HomeCamp community are big fans of the Arduino platform. I’ve also been dying to have a go with the MQTT client for Arduino that Nick has created (although I’ve recently also come across another platform called mbed, and MQTT has been ported to it, of which more to come soon). In fact, I’ve had one of the lovely Arduino starter kits from ::oomlout:: sitting on my desk for a while now, tempting me with its gadgetry and neatly-arranged components in a funky partitioned box… but life has been so hectic that it has taken me until today to finally crack it open!

I’m not going to spend long talking about the Arduino today, except to mention that it was unexpectedly tricky to get working under my OS of choice, Ubuntu 10.10. I’d read on Anton’s blog recently that the new UNO board (which I have) needed a firmware update in order to avoid some weirdness on the serial port, so I thought I’d go ahead and fix that first – his instructions were very clear, and the device seemed to report something, well, expected as I ran the commands. All good, or so I thought!

Português: Logotipo Arduino Uno.

Português: Logotipo Arduino Uno. (Photo credit: Wikipedia)

I installed the Arduino IDE from the Ubuntu repository and attempted to start it from the new Electronics submenu. Nothing happened. At that point I decided to try running “arduino” from the command line, and got back a Java stack trace containing java.lang.UnsatisfiedLinkError: rxtxSerial indicating an issue with some of the libraries. At that point a quick DuckDuckGo search (yes, I’m not using Google much these days) led me to an Ubuntu PPA which contained a fixed version of the IDE.

I was then able to fire up the toolkit and excitedly started looking at the Basic samples. However, as soon as I tried to upload one to the board, I got an error avrdude: stk500_recv(): programmer is not responding which suggested that the board was not being “seen” by the IDE. The only interface the toolkit recognised was ttyS0 and I knew the Arduino wasn’t there… looking in /var/log/messages I could see that it created an interface /dev/ttyACM0 when I plugged it in, but the toolkit wasn’t seeing that. I then tried creating a symlink from /dev/ttyUSB0 (where the wikis and documentation were telling me to expect the Arduino) to /dev/ttyACM0 – and presto, it worked.

Creating static symbolic links in /dev is a bit hokey these days, of course, so I moved across to udev and created a new rule for the UNO in a file called /etc/udev/rules.d/80-arduino-uno.rule

KERNEL=="ttyACM*", ATTRS{product}=="Arduino*", SYMLINK+="ttyUSB%n"

dead simple: if a new device pops up in the kernel named ttyACMsomething, and it has a USB product ID string starting Arduino (which mine does, I checked using the command usb-devices), add another symlink to it at ttyUSBsomething, thanks. Result:

Dec 21 19:18:50 agrippa kernel: [21501.209012] usb 1-1.1: new full 
speed USB device using ehci_hcd and address 17
Dec 21 19:18:50 agrippa kernel: [21501.303198] cdc_acm 1-1.1:1.0: 
ttyACM0: USB ACM device
andyp@agrippa:/etc/udev/rules.d$ ls -l /dev/ttyU*
lrwxrwxrwx 1 root root 7 2010-12-21 19:18 /dev/ttyUSB0 -> ttyACM0

That all seems to have done the trick. I’m just waiting on a couple of shields for the board, not least something that will let me connect it to a network, and then the experiments will continue! Weather-permitting the next lot of electronics should appear in the next day or so. More to come, on both Arduino and mbed hackery…

Gallery

UNO

This gallery contains 3 photos.

Rate this: