Which you discard. So, the point of having called constrain() is lost. So, you might as well not call it.
Sorry for not understanding, I'm using the constrain on the b1 value, thus making sure it never leaves its range, I do not see how I'm discarding it.
How is the XBee connected to the Arduino? How is the other XBee connected to the PC? How are the two XBees configured?
Ok, the sender is connected to the rx/tx on a arduino duemilanove. When I use a FTDI board with the other xbee and X-CTU software, I receive all the packets witout any problem: I'm assuming since I haven't changed anything major in the setup that everything is working and the receiving Xbee puts out serial data (I have been able to send single bytes in the past). However more complex packets (which contain more information) have never been received correctly by the other arduino which is:
A arduino mini pro with the xbee connected to pin 10 (rx) and 11 (tx) using softserial (mostly for debugging).
I have been looking into strings, but since i want to send/receive bytes (with values from 0 to 255), a simple array would be the most efficient way.