Yun usb connection

Hi guys!!!

I'd like to connect 2 arduinos via usb, in my case I gonna use an Arduino Yun and a Crius, which is an imu(flight controller) but it works as a normal arduino, i tried to connect them through USB and using Serial1.available() Serial.read() and Serial.write("hi") but nothing it gives me -1 on the monitor of the receiver that means that it doesn't recieve nothing.... :confused: :confused: :confused: Could someone help me sending some code or linking some web site where I can learn something.

Thanks. :)

Don't mix up Serial and Serial1; if you connect your Yun to the micro usb bus, use Serial; (the other usb connector is handled by the Linux side of the Yun). The Serial1 stream is the connection between the AtMega processor and the MIPS processor.

kind regards,

Jos

If you want to connect the two Yun via USB, you have to use the USB Host port. If you use this setup you will have an USB cable that goes from the micro USB port of one Yun to the USB Host port of the other Yun.

The Atmega of the first Yun will talk to the Linux processor of the second one and in Linino you will find a ttyACM under /dev/.

So the final path for communication is: Arduino Yun 1 ->Serial->Linux of Arduino Yun 2 (/dev/ttyACM)->Serial1 of the Arduino Yun 2.

Something is missing in this configuration. You will need to write some code/script that will run in the Linino of the Yun 2. This code will act as bridge between ttyACM and Serial1.

Angelo9999: If you want to connect the two Yun via USB, you have to use the USB Host port. If you use this setup you will have an USB cable that goes from the micro USB port of one Yun to the USB Host port of the other Yun.

The Atmega of the first Yun will talk to the Linux processor of the second one and in Linino you will find a ttyACM under /dev/.

So the final path for communication is: Arduino Yun 1 ->Serial->Linux of Arduino Yun 2 (/dev/ttyACM)->Serial1 of the Arduino Yun 2.

Something is missing in this configuration. You will need to write some code/script that will run in the Linino of the Yun 2. This code will act as bridge between ttyACM and Serial1.

First of all thanks to your reply....I got it... but I have to use a particular library such as SerialUsb to use the CDC communication or the normal Serial ?? could you link if possible some website for the code for the linino..? Thanks!!