Using Yun to control multiple Uno

As the tittle describe, my

Goal: Using Yun as a bridge for me to communicate with a large project (involve multiple Unos) over the web.

Ultimate Goal: Carried over from my previous Topic Entry , my ultimate goal is to use Yun as the main board to control a robot system which consist of multiple Unos. Yun will mainly be used for communication with the user, and relay message/signals to Uno to perform specific task. To illustrate, it should look something like

HTML web → JavaScript to trigger specific routine → Yun → request sensor data → Uno1 (sensor control)-> return data → Yun Linux → compute data and return data → Yun Arduino → make decision and send response signal → Uno2, Uno3… etc (motor control)

Current Aim: To Control Multiple Arduino Uno [sub control] with an Arduino Yun [main control]. Each Uno will have their own unique roles designed using (Switch() case: or if()) where I simple have to send a signal from Yun to trigger them. To illustrate, it should look something like

HTML Web → JavaScript → Arduino Yun → Obtain Sensor Data & Process Data → Arduino Yun → Send Result → Arduino Uno(s) → react base on Result using the pre-define (Switch() case: or if()).

Question: What should I do to pull this off? my Initial thought was directly connect Yun Pin to Pin of an Uno and simply use HIGH/LOW Pin state as trigger; But then I thought I should ask first before messing up anything as my current solution is probably not the smartest way.

I hope I’ve clarify my question and motive clearly.

Thank you! :slight_smile:

If a simple high/low level signal is all you need to trigger the Uno, then that could be an easy way.

As I was reading this, I was assuming you would need more communications ability that that, and would also need to send data from the Uno to the Yun. My first thought was to plug a powered USB hub into the USB host port, and then plug the USB ports from all of the Unos into that. They will each show up as USB serial devices under Linux. Your main communications dispatcher code could run under Linux, and talk to each of the Unos through the appropriate tty device. The sketch on the Uno would talk to the Yun through the standard Serial classes.

Each time the system starts up, the USB ports may enumerate in a different order, so a particular Uno might not always be associated with the same tty device under Linux. Your communications manager should probably step through all available USB ttys, and send a command to the Uno to identify itself so you can figure out which Uno is on which port.