APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Wiring.org I/O Board

As I explained at my review of Making Things Talk, that book re-awakened my interest in electronics. Frankly, although I've had a lot of fun with computers and programming over the last thirty years, it's getting a little too smooth and polished for my taste. I'm a rough and tumble, Wild West kind of guy - I liked programming the most when it was bare metal. So after excitedly ripping through that book at Warp 8, I rushed to my computer and ordered a "Wiring" I/O board.

Slight aside: worst product naming ever. Using "Wiring" as your product name makes it very difficult to find things about it on the web. They should have called it something meaningless and unique.

The Wiring board is 128K flash memory with a ATMEL atmega128 microcontroller and a bunch of inputs and outputs. I bought this instead of the less expensive Arduino board because it has an RS232 serial input in addition to the USB.

I had a little trouble getting this working on my Mac - the Wiring language you download hasn't yet been updated for Leopard - it uses niutil commands, which has all been replaced with dscl. Being lazy and impatient, I didn't want to figure out what I'd need to do with dscl, so I just changed perms on /var/lock and /var/spool.

I also initially screwed up by downloading Processing instead of Wiring - basically the same language, but the underlying libraries are different, so of course I got nowhere fast. However, I eventually realized my mistake and very soon after that was able to write my first program. Wiring makes that very easy because there's a diagnostic LED on the board at pin 48, so this program exercises it:

// Blinking LED
// by BARRAGAN <http://barraganstudio.com>

// turns on and off light (LED) connected to a digital pin, with 
// intervals of 1 second (1000 milliseconds)
// Note in the circuit the LED it has a positive (long leg) and a ground
// (short leg), if the LED doesn't turn ON, it might be it is inverted.

// Created 2 December 2003
// Revised 1 May 2007
// modified a.p.lawrence to use pin 48 and to change delay interval

int ledPin = 48;           // LED connected to the Wiring I/O board pin 48

void setup()
{
  pinMode(ledPin, OUTPUT); // sets the digital pin as output
}

void loop()
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(5000);                  // waits for 5 seconds
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(5000);
}
 
wiring i/o board led off
wiring i/o board led on

Having not read the instructions fully .. ok, ok, having not read the instructions at all, I didn't realize at first that I needed to reset the board to load the compiled program. There's a little button to do that.. push it and there is a brief period of time during which you can upload your code. The code is then stored in the flash memory. That's all covered in the User's Guide that I hadn't bothered to read..

The two images at left show the diagnostic light being controlled by that program. Pretty exciting, right? Well, maybe not, but it is an easy way to start to understand the board and how to program it without having to worry about whether you reversed anything, or used the wrong resistor or whatever: it shows you the darn thing works.

There's not much more I can do with this right now anyway. I was sure that in some drawer here I had piles of miscellaneous resistors, jumpers and similar stuff left over from thirty-five years or so back, but I've pawed through everything and can't find a thing. Probably the smart thing to do is just order a "Starter pack". Strangely enough, I haven't been able to easily find that on-line. I can find a few stores that sell kits of mixed resistors and the like, but they are all overseas.. maybe electronics as a hobby is less popular in the U.S.? Oh well, I'll stop in a You-Do-It; they probably have something.. and if not, I'll just grab a bunch of stuff and make my own kit.

This is going to be fun..



Got something to add? Send me email.



4 comments



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Anthony Lawrence







Sun Nov 11 14:10:21 2007: 3248   bruceg2004


Thanks, Tony. I can't wait to start experimenting with this, with my 4.5 yr old daughter. She is probably a bit young for this right now, but she loves to build things. Poor girl has me as her father; I used to love messing around with electronics as a kid. Things certainly have come a long way from taking my allowance to a Radio Shack, and spending it on motors, resistors, breadboards, and switches :-)



Mon Nov 12 16:30:51 2007: 3253   BigDumbDinosaur


Hey, Tony. Sounds as though you are getting a real charge out of this! <Groan>



Tue Nov 13 15:13:57 2007: 3255   BigDumbDinosaur


BTW, what's that scripting language? Looks like a cross between BASIC and C.



Tue Nov 13 16:42:38 2007: 3256   TonyLawrence

gravatar
It's called "Processing" (though I'm using the "Wiring" version here). It's open source. See (link)

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





AOL is like the cockroach left after the nuclear bomb hits. They know how to survive. (Jan Horsfall, VP of Marketing for Lycos)

You learn about life by the accidents you have, over and over again, and your father is always in your head when that stuff happens. (Kurt Vonnegut)












This post tagged: