hi
hmmm last what i want to know it is "there is no way to do what with serial port and XBee)
i want to make my own project or home monitor and control (whatever you call it just want it
to run)
first time i work on Arduino i find it something cool and more easier than Parallax Quickstart
Microcontroller board
.. it's have more example more project open source and a lots of things
i decide to spend all my budget for several month to buy my kit and working on Arduino to make
some cool project for beginner and do that just for fun and learn more thinks about electronic
and programming
i but many kit form Aliexpress it's cost me 120 $ us
and form Seeedstudio 186.40 $ us
and from Sparkfun 175 $ us
maybe someone say that's too much (he is right i agree with him but i prefer to spend my budget
for several month of work to buy this things to learn from it instead of buying Playstation4 or
Xbox One )
i buy many sensor for gas and motion and vibration and buzzer
also i buy lcd screen
an Arduino board
2 XBee wireless series 1 pro
and a lots of sensors
this picture is for some of my kits
i success to work with all sensor and kits and make good mini project for sensor with screen
and many other project with my kits
i want to make something more advance like connect all this sensor together and use the XBee to
send the sensors values form one Arduino to the other Arduino with XBee in my room to receive
the sensors read and control other kits connected to arduino mega (use mega because it contain
a lots of pin and it's have bigger EEPROM)
but i surprise when i find that i cant send multi value by XBee in the same time
i need to send every sensor read as single then receive it
what about the other sensor and controlling the servo motor and other things
i want to make it in one sending mode
send all the sensors values and the controlling value in one code and receive it then split
every read value
so my question is can i send mutli sensor value by XBee to collect all sensors read
from another Arduino
i try to write my own code as test
this code for transmitter
char test='Hello World';
void setup(){
// Start up our serial port, we configured our XBEE devices for 9600 bps.
Serial.begin(9600);
}
void loop(){
Serial.write(test);
}
and this code for receiver
String sensorvalue;
void setup()
{
Serial.begin(9600);
}
void loop()
{
if(Serial.available() > 0)
{
while(Serial.available() > 0)
{
sensorvalue += char( Serial.read());
delay(5);
}
Serial.println(sensorvalue);
sensorvalue ="";
}
}
but when i open the serial monitor i didn't see the sent data why this happened
when i use the receiver code with Arduino UNO without using XBee just one Arduino connected to
PC and then open serial monitor then write "Hello World"
i receive it in one world
not
h
e
l
l
o
...etc
so why when i connect two Arduino via XBee and send the same world i didn't receive it as i
receive it from serial monitor in PC
that the first problem i fail to solve it
how about sending all sensor read in the same time
please some help some advice about this
this problem made me frustrated because I haven't found any solution to it
my regards