Hello!
The questions I ask are just out of curiosity; I don't have 2 Arduinos. Let's say that you have 2 Arduinos with pins 1 and 0 connected to the other Arduino's corrosponding pins. The first Arduino Serial.write('0') and the second Arduino Serial.read(). Will the second Arduino receive '0' (48 in ASCII)? Also, can you use this method to dowload a sketch onto both Arduinos at the same time? If that is possible, it would be very useful for programming breadboard Arduinos, without a costly USB breakout.
Thanks!
Yes.
That's all there is to say about it really.
It's RS-232 data at TTL voltage levels.
As long as they are running at the same baud rate, all will work fine.
You can even add some other connections between digital IO lines to provide some hardware flow control if you like.
Also, can you use this method to dowload a sketch onto both Arduinos at the same time?
That part, alas, no.
There is data flowing back from the Arduino to the computer. Both Arduinos would respond, and it would break.
You can't connect the Tx to the Tx and the Rx to the Rx -- it has to be Tx to Rx and Rx to Tx (transmitter goes to receiver).
majenko:
Also, can you use this method to dowload a sketch onto both Arduinos at the same time?
That part, alas, no.
There is data flowing back from the Arduino to the computer. Both Arduinos would respond, and it would break.
You could try it without one tx connected
You could try it without one tx connected
You could - don't know how much mileage you'd get, but why not try? Maybe I'll dig out my second arduino sometime and try it out...
I don't have a second Arduino. But, if there is no risk of damage whatsoever, I might try it with my Arduino UNO SMD Edition and one of my classmate's (or teacher's) Arduino, if we ever meet up for Arduino before the end of June. If it works perfectly, it would be great news to people making breadboard Arduinos; they wouldn't need the >$20 USB breakout. Also, what to you mean by "mileage"? I searched on Google, and found "distance between two places in miles". I wish that I can buy parts online, but there are HUGE shipping fees.
"mileage" is used as a measurement of success. It means I don't know how successful you'll be.
dkl65:
I don't have a second Arduino. But, if there is no risk of damage whatsoever, I might try it with my Arduino UNO SMD Edition and one of my classmate's (or teacher's) Arduino, if we ever meet up for Arduino before the end of June. If it works perfectly, it would be great news to people making breadboard Arduinos; they wouldn't need the >$20 USB breakout. Also, what to you mean by "mileage"? I searched on Google, and found "distance between two places in miles". I wish that I can buy parts online, but there are HUGE shipping fees.
The usual way to do it is to remove the chip on your arduino. Holding down the reset button would also work.
The Arduino I have (as mentioned before) has a very small SMD ATmega328 chip. It cannot be removed. So, if I want to program Arduino #2 using Arduino #1, I would:
[Edited with suggestions]
- Connect #1 to the computer via USB
- Connect #2's RX to #1's RX, and #2's TX to #1's TX
- Connect #1's reset line to GND
- Click the upload button
Again, I probaby won't ever do this; I don't plan on making a breadboard Arduino.
No; tx would need to go to tx (and Rx to Rx). In this case, you're simply ignoring the first arduino's function as a computer and just using its USB chip. This chip expects to have one line go to the atmega's tx and the other to the atmega's rx -- you still want that to happen, just with a different atmega.
You don't want #2 to talk to #1; you want #2 to be #1.
dkl65:
I don't plan on making a breadboard Arduino.
Oh but you should!
Do you need to connect the GND pins of the two Arduinos together?
Do you need to connect the GND pins of the two Arduinos together?
Yes, otherwise how is the electricity going to form a circuit?
One might as well connect the 5V and GND pins together if one Arduino isn't powered by any other source.
One might as well connect the 5V and GND pins together.[/quote]
Only if one of the Arduinos isn't powered by any other source.
It is dangerous to connect two voltage regulators in parallel without additional hardware, so two Arduinos, both powered through the power jacks, with the 5V connections tied together, is liable to kill one or both of the voltage regulators.
Did anyone try sending Serial data or uploading sketches using the TX/RX pins?
Off topic, but will connecting batteries in parallel increase their current capability and/or capacity?
Batteries in parallel will increase the current capacity. However, 2 batteries won't double it. Batteries never have an absolutely identical voltage, and the battery with the higher voltage will try and charge the one with the lower voltage. That will waste some current.
If the voltages are vastly different it could cause a non-rechargeable battery to explode.