Go Down

Topic: Xbee Pro XSC (Read 1 time) previous topic - next topic

HazardsMind

#5
Nov 16, 2012, 10:08 pm Last Edit: Nov 16, 2012, 10:19 pm by HazardsMind Reason: 1
Also one other thing, if you want to receive data from the master to the slave and then print that data from the slave, you need to have a ARD mega, because a regular UNO will not be able to do both.

Unless, your master has a LCD display in which case it can do both, but to get the data from a RF or BT module and then display it on a computer monitor, it can't do that.

MEGA:
Serial.begin(9600); //print the incoming data to the screenget the incoming data
Serial1.begin(9600); // get the incoming data

Serial.print(/*your data here*/); // NOTICE the Serial"1" this puts your data on a different TX/RX to be output to the screen.
Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

techra

ok so we made the master as the mega now and the uno as the slave,and changed it to Serial1.write();

HazardsMind

no the slave has to be the MEGA, because it is doing two different things with its TX and RX ports.

oh I edited my previous comment, I change the Serial and Serial1 lines. Serial is connected the usb so that should go to the PC monitor.
Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

techra

and doesnt the mega have 4 serial ports,im using the 0th one,so do i need to configure it as 1

HazardsMind

no RX0 and TX0 is just Serial, everything else is Serial1...2...3.
Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

Go Up