Go Down

Topic: Arduino to Arduino comms via USB (Read 395 times) previous topic - next topic

vipercomp

Hi, I'd like to set up communication between two Arduino Uno's using their normal USB sockets; can anyone tell me if this is possible--I only need to send a small amount of data? Presumably I'd need to make a suitable crossover lead with two type B plugs?


PaulS

Quote
Presumably I'd need to make a suitable crossover lead with two type B plugs?

Don't waste your time or cables. The USB chip on the Arduino is a USB slave. Two USB slaves can not talk to each other.

Now, if you connect the TX and RX pins directly, crossed of course, and ground, the two can talk serial to each other.

vipercomp

Ah, thank you, I had a feeling that there might be a catch; I'll do as you suggest.

Nick Gammon

I have examples of connecting two Arduinos together using SPI or I2C for debugging:

http://www.gammon.com.au/forum/?id=11329

However as Paul says, the simplest is to use two wires and serial comms (plug ground of course). For serial you swap the wires over, for I2C and SPI you don't.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up