Pages: [1]   Go Down
Author Topic: Arduino to Arduino comms via USB  (Read 360 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 615
Posts: 49412
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 485
Posts: 18810
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Pages: [1]   Go Up
Jump to: