software serial2

ok i fixed it

http://www.ladyada.net/make/eshield/AFSoftSerial.zip

supports RX and TX, up to 57600 tested. due to the delay inherent in digitalRead() its probably not possible to go any faster.
should probably be poked at by others. currently only for Diecimila (16mhz atmega168)

#include <AFSoftSerial.h>

AFSoftSerial mySerial =  AFSoftSerial(3, 2);

void setup()  {
 pinMode(13, OUTPUT);
 Serial.begin(9600);
 // set the data rate for the SoftwareSerial port
 mySerial.begin(9600);
 mySerial.println("Hello, world...");
}

void loop()                     // run over and over again
{
 if (mySerial.available()) {
     Serial.print((char)mySerial.read());
 }
 if (Serial.available()) {
     mySerial.print((char)Serial.read());
 }
}

What a genius, you rock! That fixes a huge problem, that would enable a few serial devices to be connected to one board, how did you do it?

Will it work with BT's, Lilypads and NG's?