Hi guys!
I'm now trying to make telemetry system to measure some UAV's parameters in real-time, such as voltage, current, altitude, GPS long-lat, etc. Because of many parameters (total is about 10 parameters), I use Arduino Mega 2560 since it has more analog input pins, and then send those parameters via radio.
But, I find an error in the received data. I only send string "test" to test it, and in the receiver, I don't get "test" in a right string like I send. Sometimes I get only "tes (without 't')", sometimes only "te" plus random character, even other random strings without meaning. FYI, I use radio : X-tend 900Mhz, baud-rate 9600, and use external power to supply the radio (not directly using power from Arduino Mega). Does anyone know how to solve this problem ? I've tried to browse on the internet and didn't found about this topic.
Here is the code, only a simple code to test the radio via arduino mega :
void setup()
{
Serial2.begin(9600); //I use rx2-tx2
}
void loop()
{
Serial2.write("test"); //I use rx2-tx2
}
FYI, I have tested it in Arduino Uno in similar testing to send a string via radio. And it worked well.
Thank you after all, Guys!