7

We have many Arduinos and we will be putting each of them in a cubicle. All of them are connected to only one PC. The PC will stand as a server were you can control your Arduino there.

  • 1
    forum.arduino.cc/index.php?topic=407.0 Seems like it is possible, you just have to do more than just plug multiple Arduinos into the pc. – I. Wolfe Mar 2 '15 at 22:37
  • Slightly beyond trivial on a recent Linux, don't know about Windows or OSX. – jippie Mar 2 '15 at 23:02
  • Modern FTDI device driver should be fine, that forum post is from 2009. As long as each arduino gets a unique COM port number, I don't see why it wouldn't work. – MarkU Mar 2 '15 at 23:42
  • If you can test the idea using two arduino, it should scale to any number (assuming there's no artificial restriction in the arduino IDE source code. The days of COM1/2/3/4 are long gone, they should be enumerating the port numbers from the OS instead of guessing.) Try it and see? – MarkU Mar 2 '15 at 23:46
8

Yes, you can connect multiple Arduino UNO (USB) boards to a single PC. There's a simple way and a more advanced way to manage it.

The simple way is, having multiple boards plugged in, but using only one Arduino Software IDE to control one board at a time. (IDE = Integrated Development Environment. Some elements of the Arduino system use non-standard technical terms.) Use the Tools > Port menu to select which one of the attached boards to control. The selected board type and port appear in the lower right status bar.

A more advanced way to manage multiple boards, is to open multiple Arduino Software IDE instances -- each instance has its own independent Tools > Port setting. You could then edit, verify, and upload two different "sketches" (programs) to two different boards, without losing your place and without having to constantly change the Tools > Port setting. This would be convenient if you were developing a communications protocol between two or more boards.

This multiple-ports technique won't work unless you launch another instance of the Arduino Software IDE, without closing the first one. It isn't enough to use the File menu to open another window, because then you just get another window that shares the same Tools > Ports setting. Changing the ports setting on one window, changes the setting on all of the windows that belong to that instance. To support multiple boards at the same time, you have to actually launch the Arduino Software IDE again, without closing the first one, to create a second instance.

Usually you'd expect each window would represent a unique document, and they'd all be related to the application. But Arduino Software IDE has a hidden dependency between its windows. Whenever you restart the IDE, that opens a new and invisible instance of the IDE, where it remembers the board and port settings. If you use the File menu to open a new window, that new window is still part of the same IDE. So changing the Tools > Port setting on one window, changes that setting for all of the windows that belong to that instance of the IDE.

But if you restart the Arduino Software IDE (e.g. Windows Start Menu > Arduino-1.6.0), without closing the previously opened IDE, then you get a second instance. If you pay attention to the port setting visible on the lower right status bar of each window, you can distinguish which windows belong to which IDE instance.

Each time you launch the Arduino Software IDE, you start a new instance of the software, that can talk to one board. Each instance of the IDE can have an unlimited number of windows, but they all share the same Tools > Port setting. If you re-launch the Arduino Software IDE again without closing it first, then you get a second instance that can have a different Tools > Port setting, and thus control another board at the same time.

Verified on Windows 7, Arduino Software IDE 1.6.0, with two Arduino UNO revision R2 boards (firmware rev 0001), Arduino device driver 1.0.0.0.

| improve this answer | |
  • How many instances of the IDE (and serial monitor) can one have running at once? – jnnfr Mar 9 '15 at 21:12
  • I don't think the OS places any artificial limit on the number of instances -- it's just like any other software as far as the computer is concerned. The installed hardware is what will limit how many useful instances you can open. – MarkU Mar 9 '15 at 22:55
  • Note that the Arduino IDE is probably not the best way to communicate with the boards at runtime - at most it is a tool for development and test programming, but probably should not be used for a mass-rollout programming. And it is almost certainly not what would be wanted for runtime communication - choose a solid standard or custom serial application for that instead. – Chris Stratton Mar 10 '15 at 12:48
3

I've run into the same question my self just on a Mac so in case anyone with Mac run into it: It is possible to connect and use many Arduinos to Mac at the same time. To do so run $ open -n /Applications/Arduino.app/ which will open a second instance of the Arduino IDE and you'll be able to select the Board and Port of each one and open multiple Serial windows. Notice that each Serial window has the path to the serial device which will help you know which window connected to which Arduino.

| improve this answer | |
2

yes, you are only limited by the number of USB ports you have, however you have to consider is this is the best way to achieve what you are trying to do. You can get an ESP8266 device like the nodemcu, or something that gives you a wireless connection. With this, you can connect infinite number of devices to the central PC wirelessly. A Bluetooth module is also a good idea, it all depends on your budget and what you are trying to achieve.

| improve this answer | |
1

I connect multiple arduinos to my ubuntu system. I use text editor to write code and upload code and read output from terminal.

List arduino devices

$ ls /dev/ttyACM*
/dev/ttyACM0    /dev/ttyACM1

To upload code to arduino

# to arduino 1
$ arduino --port /dev/ttyACM0 --board arduino:avr:uno --upload bt/bt.ino

 # to arduino 2
$ arduino --port /dev/ttyACM1 --board arduino:avr:mega --upload bt/bt.ino

To check output

$ screen /dev/ttyACM1 115200

$ screen /dev/ttyACM0 9600
| improve this answer | |