The second tutorial I attended at OSCON on Monday was one I had regrettably skipped when I was last here in 2008: Get Started with the Arduino. After purchasing my Getting Started with Arduino Kit for $69.95, I tore it open like a kid in a toy store. Inside the kit were the Arduino board itself, some jumper wires, a handful of components, including LED bulbs and resistors, and a USB cable to allow for programming the notebook computers everyone in attendance brought with them.
In the beginning, I was shamed. While I tried and failed to follow the Linux installation instructions, my coworker, Debbie, was able to plug my Arduino board into her Microsoft Windows notebook and get the first example running. When the udev tip didn’t work, things were looking bleak for my attempt to control open hardware with an open operating system. Finally, a trip to Google landed me right back on the Arduno wiki at the installation instructions for Fedora. Finally, I could upload code to my Arduino board. After getting the initial example to work, I modified it to change the pattern of the blinking on-board LED bulb:
int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
digitalWrite(ledPin, HIGH); delay(300);
digitalWrite(ledPin, LOW); delay(300);
digitalWrite(ledPin, HIGH); delay(300);
digitalWrite(ledPin, LOW); delay(300);
digitalWrite(ledPin, HIGH); delay(1000);
digitalWrite(ledPin, LOW); delay(1000);
}
While we were playing with our new toys, we were treated to the history of the Arduino project, some other open hardware projects, and some of the things people have done with them. Unfortunately, I was too busy playing with my new toy to take notes on these things, so the history lesson, by way of Wikipedia, is left as an exercise for the reader.
The editor embedded in the Arduino IDE leaves a lot to be desired. It’s like Microsoft Notepad with syntax coloring. My coworker found a setting that forces the IDE to use an external editor. Basically, all it does is to make the editing window read-only. Files edited outside of the IDE are re-read when the code is compiled. In short order, I was able to find a Vim syntax file for Arduino code files.
After the break, we were introduced to using the Arduino board in combination with a breadboard, which allows for the creation of more complex circuits. I’m excited, because I still have the breadboard, components, and multi-meter I bought in college for a computer engineering class. I’ve been waiting all these years to finally have an excuse to dig them out of the closet and put them to use. The Arduino will be a fun learning tool when my daughter is older, too.
To commence our unstructured time, which would last until the end of the tutorial (and the day), we were shown a simple circuit to wire up between the Arduino board and the breadboard. Using a copy of the first blinking code, we could acheive the same effect of blinking the external LED simply by modifying which pin was referenced. I took this a step further and made my LED bulb pulse like the light on a suspended MacBook.
I’m glad I decided to attend the Arduino tutorial this year. I’ve just picked up yet another hobby I don’t have time for.
Pingback: sirhc.us maxim.us » OSCON 2010: Environmental Monitoring with Arduino
Thanks for the write-up on last year’s workshop.
I’m hoping it’s okay I’ve quoted your last paragraph in the resource page for this year’s workshop: http://www.labradoc.com/i/follower/p/oscon-2011-get-started-with-the-arduino-workshop
Hope you’re managing to find sometime to keep playing with your Arduino…