Arduino UNO to Xbee <------------->Xbee to Arduino MEGA
hi everyone
im trying send strings serial monitor in arduino uno, softwareserial send these values xbee.serial() in basic configuration point point. values received sender, receive them in other xbee2.serial() , use strings in arduino mega external power supply move steppers.
in xbee's config
xbee1 xbee2
id 3332 (default), my=1 dl0 ---------- id 3332 my=0 dl=1
and arduino config
(arduino mega receiver xbee )
#include <softwareserial.h>
// connect pin 10 of arduino dout of wireless proto shield
uint8_t ssrx = 10;
// connect pin 11 of arduino din of wireless proto shield
uint8_t sstx = 11;
softwareserial nss(ssrx, sstx);
void setup() {
serial.begin(9600);
nss.begin(9600);
serial.println("serial works");
}
void loop() {
if (nss.available()>0){
char x=nss.read();
serial.write(x);
}
}
and sender same difference (rx tx 2 &3 ) in xbee shield
... if (serial.available()>0)
char s=serial.read()
nss.write(s)....
well hope understand me, need use xbees radio project.
greetings chile.
im trying send strings serial monitor in arduino uno, softwareserial send these values xbee.serial() in basic configuration point point. values received sender, receive them in other xbee2.serial() , use strings in arduino mega external power supply move steppers.
in xbee's config
xbee1 xbee2
id 3332 (default), my=1 dl0 ---------- id 3332 my=0 dl=1
and arduino config
(arduino mega receiver xbee )
#include <softwareserial.h>
// connect pin 10 of arduino dout of wireless proto shield
uint8_t ssrx = 10;
// connect pin 11 of arduino din of wireless proto shield
uint8_t sstx = 11;
softwareserial nss(ssrx, sstx);
void setup() {
serial.begin(9600);
nss.begin(9600);
serial.println("serial works");
}
void loop() {
if (nss.available()>0){
char x=nss.read();
serial.write(x);
}
}
and sender same difference (rx tx 2 &3 ) in xbee shield
... if (serial.available()>0)
char s=serial.read()
nss.write(s)....
well hope understand me, need use xbees radio project.
greetings chile.
using 0 , 1 , , dl addresses bad idea. use other values, 1000 , 1001. 0 has specific meaning.
Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > Arduino UNO to Xbee <------------->Xbee to Arduino MEGA
arduino
Comments
Post a Comment