Distance between arduinos

You need to re-organize your program with meaningful variable names. I mentioned this earlier.

For example you have this line

 T=ftemperatura();

It is quite impossible to identify all the lines of code that use the variable called T because so many words have the letter T in them.

...R