We are connecting six arduinos via an usb-hub to our raspi. Each of the arduinos will get analog data from one sensor and also control the movement of one motor. Thus we have an input and an output on all six arduinos. The program for our arduinos is already done; we will pass on specific strings to get sensor data or to drive steps with our motor. Most of our open questions are due to our master/raspi.
On our raspi we plan to store sensor data of all six sensors (each per arduino) in a SQLight database. We wish to use python 3 for "listening" to sensor data and storing it in the database. Moreover we need to keep track of the specific sensor, so that arduino 1 has it´s data stored in DB1, arduino 2 in DB2 and so on.
I have looked for similar solutions out there; but found very little. I think we have to use 6 threads, one per arduino, to run in our python script at our master. Or is there another way? We are still at the planing phase and very much appreciate if someone can pinpoint to some solutions / ideas / concepts that we could use and share.