I am planning to connect multiple Arduinos to my Raspberry Pi. There are basically two ways I can achieve that:
Use an USB hub. Each Arduino will then be available through ordinary serial commands both for reading and writing. The USB hub I have is powered and can handle both communications and powering the Arduinos.
Use I2C, so that the Arduinos are I2C slaves of the Raspberry Pi.
Since USB is used for updating the Arduino, I don't have the best feeling about using this same connection for "management" tasks.
Are there any known disadvantages to using the pre built USB socket on the Arduino in "production", any best practises or similar saying that I should not do this? Is this USB socket meant to be used for debugging and code deployment only?
The plan is to let the computer send commands to the Arduinos using a serial protocol. The computer will automatically detect whenever an Arduino is connected and immediately send a "hello" command over serial. The Arduino is then supposed to send back its "name" and a list of capability keywords. A capability may be "motion-sensor". The computer will then know that it can ask the Arduino if it has detected motion. Other capabilities may be "temperature-sensor", "barometric-sensor", "lights".
It's for a generic open source home automation system/robotics system I am working on creating a framework for.