HI,
i have two arduino micros, and i want micro A is sending data to micro B
Im trying now for 2nd day and it's driveng me nuts!!!
If i connect USB cable to micro A (this one is sending data),
i can see the data in serial monitor and the RX led lights when the data is sending...
BUT
When i disconect the usb cable and power arduino micro A with a battery...
noting works... it dosent send the data
i have managed to debug that it hangs on
while(!Serial);
The code from micro A
The code is simpyfied, but in reality i read rotary encoder and want to send the data to micro B
Post your actual code using Serial1, plus a picture or drawing of all the electrical connections (including power supplies), plus a description of what you expected to happen and what actually happened.
Ok, if we go back to basics.....
Lets say i have 1 arduino micro from who i want to send data via UART(serial) pin0 and pin1
and no USB cable attached, just a battery.... it just dosent work
If i understand correct
if i have only one arduino micro that is sending data to Serial1, the Tx LED should blink,
if i load the code like this right?
And eaven if i don't connect anything to tx/rx, right??
So you're sending data, as far as we can guess - where is that data expected to go to? What evidence do you have to show whether or not it was received there?
In your sending machine, put a bit of a pause between the Serial.print() statements.
in your receiving machine it looks like you are acknowledging receipt by just sending back to the sending machine. We need to see some indication that it was received (maybe blink light 3 times, or if you have an LCD display on there, send it a message.
And yes... arduino micro dosent light up RX/TX LED if no USB cable is attached...
IF i send via terminal (from PC) data like number 2 in my case,
yes everithing works like it should, but i want to arduinos to comunicate via serial (no PC)
Any idea why this is not working?
I have changed reciver code to this, to test if serial port is initializet…
and NOW it dosent… it hangs on while(!Serial)
…
Then i have tested and hooked up and Arduino DUE to be sender…
Then the below code works for setup…so the serial gets initialized, but dosent recive no data…
Did i just found a bug in arduino MINI?
void setup(){
pinMode(13,OUTPUT);
Serial.begin(9600);
while (!Serial) ;
for( i=0; i < 10; i++){
digitalWrite(13,HIGH);
delay(200);
digitalWrite(13,LOW);
delay(200);
}
}
I have now managed to send data trought serial from arduino DUE via Serial1
and recive it via Serial1 on arduino Micro,
if i upload the sending code to another Micro....still dosen't work, so im pritty shure that
Arduino Micro have a serial sending issue....
And its not that great, becouse i wanted to use 2 micros not 1 micro and 1 DUE
So how do you know is working??
On sender LED13 is constantly blinkink,
if the connection is ok on Reciver LED13 is alsow blinkig in 1:3 ratio, meaning sender blinks 3x reciever 1x
It is great that is working. If you want to test with leonardo boards, try this link http://www.instructables.com/id/EC81OWMHK482OMF/ Test: arduino to arduino serial using softwareSerial library