Hi I posted this question earlier but have since modified my approach a bit so I am reposting hoping that this is a bit closer to someone elses project and can get some help configuring it.
I have two xbee series 1 transmitters each attached to an arduino fio. They are each wired to a sparkfun ADXL335 accelerometer. each is set up to receive analog signals from the x and y axis accelerometer outputs on A0 and A1 fio pins.
I also have a third fio/xbee setup that will need to be set up to be the receiver of the four pieces of data being sent.
The wiring and setup is based on the arduino.cc example
I wrote a simple sketch using code derived from the sample code offered on this site for FIO setup
It works just fine, but this is setup to work with only one transmitter not two...
Any ideas on how to set up the boards to receive data from two seperate transmitters??
The settings I am using for this initial run are the following:
receiver:
BD 6
ID 0314
MY 0000
DL FFFF
D3 3
IC 8
RR 3
RO 10
Transmittter:
BD 6
ID 0314
MY 0001
DL 0000
IU 0
IA FFFF
RO 10
Ive attached a picture of the modules as they stand now. The accelerometer is not visible as it sits under the xbee in between it and the FIO.
I really hope someone can help... I bought the Building Wireless Sensor Networks book from O'reilly only to find that it doesnt cover series 1 modules :(... I'm back to square one so could really use a hand here
here is my test code that works with one transmitter module:
int sensorValue0 = 0;
int sensorValue1 = 0; // values read from the accelerometer x and y outputs
int outputValue0 = 0;
int outputValue1 = 0; // value outputs
void setup() {
// initialize serial communications at 57600 bps:
Serial.begin(57600);
}
void loop() {
// read the analog in values:
sensorValue0 = analogRead(A0);
sensorValue1 = analogRead(A1);
// map them to the range of the analog out:
outputValue0 = map(sensorValue0, 390, 630, 0, 255);
outputValue1 = map(sensorValue1, 390, 630, 0, 255);
// change the analog out values:
// print the results to the serial monitor:
Serial.print("a0: "); Serial.print(outputValue0); Serial.print(" a1: "); Serial.println(outputValue1);
// wait before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(50);
}