Pages: [1]   Go Down
Author Topic: Lilypad Simple to Xbee Shield  (Read 2108 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, so I wanna know how to connect a Lilypad arduino simple board, to an xbee shield so I can send serial data from my computer (which is connected to an xbee on an xbee explorer board) to my arduino, and vice-versa.

Lilypad Simple: https://www.sparkfun.com/products/10274
Xbee shield: https://www.sparkfun.com/products/9841?

So far I have it hooked up like this, not sure if its correct though:

Arduino      Shield
    +            3.3V
    -             GND
    5(TX)       RX
    6 (RX)      TX

Then this is the code im trying to use.

Code:
#include <SoftwareSerial.h>

#define rxPin 6
#define txPin 5


SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);

void setup()  {
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  mySerial.begin(9600);
}

void loop()
{
  mySerial.print('H');
  delay(1000);
  mySerial.print('L');
  delay(1000);
}
             

If anyone is able to help it'd be much appreciated!
Logged

Pages: [1]   Go Up
Jump to: