If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. When you post links please always use the chain links icon on the toolbar to make them clickable.
The value assigned to the final else clause is not really important since it's what's returned if a pin number that doesn't PCMSK0 is passed to the macro. It's not clear to me what the most appropriate value would be but I'm going to suggest -1:
pert:
The value assigned to the final else clause is not really important since it's what's returned if a pin number that doesn't PCMSK0 is passed to the macro. It's not clear to me what the most appropriate value would be but I'm going to suggest -1:
I tried setting this to -1 as suggested and, while it compiled, I can't seem to receive data via my Xbee setup.
Basically, I have two Protosnap Plus boards (lilypad) each attached to an Xbee. I can confirm that the Xbees are configured correctly via XCTU and, also, they are able to communicate when connected to an Arduino Uno. However, when connected to the Protosnap Plus Lilypad, SoftwareSerial.h references a custom pins_arduino.h that is provided by SparkFun (see above).
Right now, I am able to send a message from Lilypad+Xbee #1 to Lilypad+Xbee #2 but I cannot receive via Lilypad+Xbee #1. I've even tried all combinations of numbers from 0-18 (instead of -1 as suggested) but without any luck.
#include <SoftwareSerial.h>
// XBee's DOUT (TX) is connected to pin 10 (Arduino's Software RX)
// XBee's DIN (RX) is connected to pin 11 (Arduino's Software TX)
SoftwareSerial XBee(10, 11); // RX, TX
void setup()
{
// Set up both ports at 9600 baud. This value is most important
// for the XBee. Make sure the baud rate matches the config
// setting of your XBee.
XBee.begin(9600);
Serial.begin(9600);
}
void loop()
{
if (Serial.available())
{ // If data comes in from serial monitor, send it out to XBee
XBee.write(Serial.read());
}
if (XBee.available())
{ // If data comes in from XBee, send it out to serial monitor
Serial.write(XBee.read());
}
}