receiving and print serial?

I am a little confused now - i have been sitting infront of my two arduino’s 2009 for about 3 hours, pulling my hair out, attempting to understand why I cannot read serial data sent from my lillypad… I know it is sending data b/c the serial monitor can read the output when hooked up directly to the lillypad… but when i wire the tx of the lillypad to the rx of the 2009, and ask it to print out the serial data it receives… the code, i think, is right… here it is:

int incomingByte = 0;      // for incoming serial data

void setup() {
      Serial.begin(9600);      // opens serial port, sets data rate to 9600 bps

void loop() {

      // send data only when you receive data:
      if (Serial.available() > 0) {
            // read the incoming byte:
            incomingByte =;

            // say what you got:
            Serial.print("I received: ");
            Serial.println(incomingByte, DEC);

but i get absolutely nothing when i run the two (lillypad and 2009)… the rx light on the 2009 doesnt flicker either…

am i doing something stupid? anything i missed?

Try using a software serial library on a pin not used by the USB hardware.
There is a software serial library supplied with the Arduino distribution but this is nicer:

will this solve the issue? is there even an issue with using pins 1 and 0 that i should keep in mind?

pins 0 and 1 on a Duemilanove board are connected to the serial hardware in the controller chip. This could be affecting the serial signal from the lillypad and it is worth trying another pin to see if that is the problem. Iin any case, don’t forget to connect the Gnd pins between Duemilanove and lillypad/

oh. i didnt do that… that may be the problem… il try that…

the thing is tho, wen i tried the same thing with xbee’s, nothing came up either… so is taht a seperate issue or a continuation of the same one?

The serial connection to an xbee or lillypad must have the grounds connected.

ok, now I am slighly scared, because I am fairly new to the world of electronics -

I connected gnd to gnd, and did the physical pixel except with serial messages being sent over…, and it worked…

but, i didnt think this would happen, but i cant turn off the lilypad now, because apparently the gnd is the power source? is this wat is going on? Is the 2009 acting as the power source for the lilypad through the gnd wire? what happens if I turn on both the power source of the lilypad and the 2009 at the same time? Will I burn something out? Is it even supposed to do this at all?!?! :-?

How do you have the Lilypad wired?

There are pins on the Lilypad JP2 serial connecter marked VCC and GND and the Lilypad will be powered when these are connected to the Arduino 5 volt pin and Gnd (ground).

Yeah you are getting a small current into the lilypad through the transmit pin of the 2009. This is just enough to run the lilypad.

You don’t need to be “scared”. Most likely if you try to run anything on the lilypad, like some LEDs, there won’t be enough current and it will reset. The lilypad will need it’s own power supply.

So you are saying I should have the 2009 powered, wired rx - tx; tx - rx; gnd - gnd, and power the lilypad as well? this will not do anything bad?

I am perhaps a little more worried than I should be, but the thing is my lilypad is already sewed onto clothing so it will be quite an annoying problem if I screw something up and will be forced to replace the board

Yes that is what you should do.