Arduino to Arduino is not working. Arduino to xbee usb dongle/xctu is working. In the past I have got arduino to arduino to work, it was either working unreliably or working all the time. It has since stopped working. Again arduino to PC works all the time, sometimes the PC connection needs to be reset or it wont catch the first iterations.
The RSSI on the receiving arduino regulator does not light up. I switched the regulator boards and lights green when it transmits. I did not debug to see if it will light up green when receiving, but i dont think its necessary. the explorer dongle lights up green when receiving as i said arduino to pc works.
When arduino to arduino was working unreliably I would only get success when I first uploaded the sketch if I were to reset arduino it wouldn't work. I am buying another Arduino Leonardo. How could arduino break? I dont see how I could have shorted the board.
When I remove xbee from arduino I saw a green light on the regulator. The circuit was still complete and the other arduino was looping transmission.
No the wires are not plugged in incorrectly. I have unplugged everything uploaded sketch and then reconnected.
End device is transmitting to Coordinator.
Yes pan id is set. Yes Destinations are set. yes baud rates are set. Other than that it is factory.
Products used:
2x Arduino Leonardo
2x XBeePro s2b
2x Sparkfun regulator boards
2x Lipo 3.7
Here is transmit code:
//variables
char b = 'A';
int c=0;
int d=0;
void setup()
{
// set the data rate for the Serial, this is xbee connection
Serial1.begin(9600);
//debug light on
analogWrite(A0,255);
delay(20);
delay(1000);
//Serial.println("Hello, world?");
}
void loop()
{
//just a loop printing iteration
c=0;
while (c<80)
{
Serial1.print(b);
Serial1.print(c);
c+=1;
}
delay(100);
Serial1.print('A');
//just a loop with a delay
d=0;
while(d<5)
{
Serial1.print('A');
delay(5);
d+=1;
}
analogWrite(A0,0);
delay(3000);
}
Here is receive code:
// I have tried both software serial and Serial1 with mySerial replacing Serial1 below
//#include <SoftwareSerial.h>
//blue-RX,white-Tx,yellow-pwr,green-grnd
//SoftwareSerial mySerial(8,2); //(RX,TX)
//variables some of which like message are irrelevant
char message[3]="GK";
char a = 'a';
char b = 'a';
char c ='a';
char d = 'a';
char o = 'O';
void setup()
{
// set the data rate RF
Serial1.begin(9600);
delay(1200);
//set data rate for arduino IDE
Serial.begin(9600);
delay(2000);
}
void loop()
{
if (Serial1.available())
{
b=Serial1.read();
Serial.println("b is:");
Serial.println(b);
}
}
here is xctu log:
A0A1A2A3A4A5A6A7A8A9A10A11A12A13A14A15A16A17A18A19A20A21A22A23A24A25A26A27A28A29A30A31A32A33A34A35A36A37A38A39A40A41A42A43A44A45A46A47A48A49A50A51A52A53A54A55A56A57A58A59A60A61A62A63A64A65A66A67A68A69A70A71A72A73A74A75A76A77A78A79AAAAAAA0A1A2A3A4A5A6A7A8A9A10A11A12A13A14A15A16A17A18A19A20A21A22A23A24A25A26A27A28A29A30A31A32A33A34A35A36A37A38A39A40A41A42A43A44A45A46A47A48A49A50A51A52A53A54A55A56A57A58A59A60A61A62A63A64A65A66A67A68A69A70A71A72A73A74A75A76A77A78A79AAAAAAA0A1A2A3A4A5A6A7A8A9A10A11A12A13A14A15A16A17A18A19A20A21A22A23A24A25A26A27A28A29A30A31A32A33A34A35A36A37A38A39A40A41A42A43A44A45A46A47A48A49A50A51A52A53A54A55A56A57A58A59A60A61A62A63A64A65A66A67A68A69A70A71A72A73A74A75A76A77A78A79AAAAAA