Hi, I'm having a problem with communicating between 2 Arduinos. I have 2 arduinos connected to 2 different computers, they are connected directly from tx to rx. Data is transmitted, but it does not seem to be correct at all.
If I type "1" into the serial monitor of 1 arduino, 4 separate lines come into the serial monitor of the other arduino, the first 2 lines change and the last 2 lines are pretty much always 13 and 10. It does not matter what I type into the first serial monitor, the other's serial monitor always pops up with 4 lines of data, 2 different numbers and then 13 and 10.
Is this normal? It doesn't seem like it is. Anyone know what is going wrong?
Type of Arduino?
Code fractions?
Comm Speed?
These things are nice to have to troubulshoot
Mega can for exemplel communicate at different speeds to computer and "slaves".
Are there calculations between sending and receving or just plain relay?
Hehe, the 13 and 10, linefeed and return?
Both boards are Duemilanove with the ATMega328. Both set up for 9600 baud and its just a simple relay(i think thats the term) just printing on 1 serial monitor and Serial.available and Serial.read on the 2nd arduino. Unfortunately I do not have the code or monitor results at my disposal right now.
But these lines are being used by the USB / Serial bridge at the same time so what you receive from one arduino is interfering with the communications to it from the PC.
I loaded the software serial code up on 2 arduinos and connected them, pin 6 to pin 7 and pin 7 to pin 6, but nothing is transmitted between them on the serial monitors. I'm not sure what I'm doing wrong.
are you relaying the messages to the ordinary serial to bee seen on the computers, pc1>ardu1>ardu2>pc2
serial monitor only sees the usual rx tx I think
Test it by having arduinos blink led or something when they get software serial message
like:
ard1 turns on led for 500ms and sends message to ard2
if ard2 sees message then it turns on led for 500ms and sends message to ard1 or computer...
I use ArduinoMega so I don't have this problem of lacking serial ports (have 4 serial ports now). but that doesn't mean that I won't communicate back and forth with another smaller arduino cluster later
sorry again, but I must rest now, 4 hr till I must wake up again
and things are getting blurry.
D.
this would copy the other arduinos output on to your serial monitor.
The other arduino should ideally have another picture
but otherwise about the same setup (tx and rx pins reversed too)
so whenever you press reset-button on either arduino, the init-picture is sent to the other arduino and relayed to the other arduino's serial-monitor
If you are sending characters and getting decimal numbers, then you might be using the wrong encoding format. Perhaps the sender is shipping out ASCII numbers instead of character codes. How else would 10 (linefeed) and 13 (carriage return) appear?