Tuesday, 27 January 2009

Up and running on the Illuminato in 5 minutes

Matt's been a pretty busy bumble bee during the last few weeks, and so has Mike. They've been working so hard it's actually pretty motivating. So, I've spent the past week or so picking up Matt's original Illuminato core file, and integrating it into a special distribution of the Arduino IDE, to save people all the hassle of manually installing the core themselves. If you want to manually install it, it's still possible, just following the instructions over at the wiki, but you probably have more important things to do ;-)

Here goes:

Step 1: Download the Mac or Windows IDE package here
Mac - the OS X version is here
Windows - the Wintel version is here
Linux - help? I don't have a lot of experience on Linux, sadly

I guess you could call this a branch of the main Arduino IDE tree that David Mellis maintains over at the arduino website. I've started to host over at github (git is a code repository versioning system that Linus Torvalds uses, and is gaining popularity, so I figured I'd try it out) ... thanks Matt (the other Matt) for helping me figure it out.

Step 2: Run the downloaded installer
I met Omar at a local meeting up in Hartford through a mutual friend, and he actually knows how to write real, professional installers (he does it all the time at his day job). He's written the first formal "installer" for the Arduino IDE that I think anyone's ever written! The reason is because that this version of the IDE includes significantly upgraded AVR compilers that fix a lot of the compiler issues I've been having on the Mac recently.

Step 3: Open the Arduino IDE

This one's easy, once the installer is done, just open the IDE from wherever it installed, just like you normally would. The biggest changes to this are completely transparent to most people, because they're all under the hood. But the biggest visible change for now is the fact that in the Tools-Boards menu, you can select the "Illuminato" as a core option.

Step 4: Start playing around with the Illuminato's functions
Also, for anyone wanting to get up and running on the Arduino, usually the "blink" app is the first thing anyone runs. Here's a version of it for the Illuminato, except instead of blinking LED 13, it blinks the bling() LEDs on the back of the board!

//****************************************
//* Blinking LED on the Illuminato
//* ------------
//*
//* blinks the background white LEDs on the
//* back of the Illuminato board
//*
//* adopted from H. Barragan from Wiring, then
//* adopted from the Arduino wiki by
//* DojoDave at arduino.berlios.de,
//* then updated for the Illuminato by me :)
void setup()
{
/* Nothing to Setup! */
}

void loop()
{
bling(ON); //turns bling on
delay(1000); // waits for a second
bling(OFF); //turns bling off
delay(1000); // waits for a second
}

The truth is, for the most part, all the core, base functions are the same as they are on the original Arduino. Matt and I ported the Software Serial to the Illuminato completely since that's the one he and I use the most, and so it can run now on pins 0-7, which lets it support almost every shield out there. Here's a little example of how to use it:

//****************************************
//* Here's an Illuminato software
//* serial example!
//* ---
//****************************************
#define RX_PIN 3
#define TX_PIN 2
SoftSerial mySerial = SoftSerial(RX_PIN,TX_PIN);

uint8_t inComingByte;

void setup()
{
mySerial.begin(9600); //let's setup for 9600 baud
}

void loop()
{
mySerial.print('U'); //sends a 'U' character to the Slide
inComingByte = mySerial.read(); //reads a character from the Slide
}

When that blinking and Serial gets boring, check out Matt's Apple Sleep-button-like pulsing program over here, which is also downloadable on the App store here.

Don't forget to grab Matt's handy reference chart sheet over here:

All the code in the new branch is posted over here at github. Matt's gotten a lot of emails (Mike too) of some guys wanting to help port the libraries to the Illuminato, so I think that's a perfect use for git, and it'll help everyone keep the code so much more organized :)

0 comments:

Post a Comment