To take advantage of all the opportunities offered by Yun shield we need to do a preparatory work both for the boards that we want to connect and to adapt the Arduino IDE to work with different combinations of modules.
The Yun shield uses the SPI port to load sketches and the UART serial port to communicate, using the Bridge library, with the microcontroller it is linked to. For further information on Bridge lib refer, once again, to the quoted paper. In order to establish the communication link between shield and module you must check the following:
On Arduino UNO the UART serial connection between mega328P and mega16u2 microcontrollers interferes with the Bridge library functions used to communicate with Yun shield.
You must disable the UART connection by configuring the microcontroller mega16u2 in “reset”. In practice short-circuit the pins shown in figure with the yellow jumper included in Yun shield package and power the two boards using the DC plug on Arduino UNO.
Note that with this configuration you can no longer connect Arduino to a pc via the USB port. For programming and debugging, you need to use the WiFi connection by choosing the “Arduino UNO – Dragino Yun” board on the IDE boards list.
Even in Arduino Mega2560 the UART serial connection between the mega16u2 and Mega2560 microcontroller interferes with the Bridge library. You must disable that connection by configuring the microcontroller mega16u2 in “reset”.
In practice short-circuit the pins shown in figure with the yellow jumper included in Yun shield package and power the two boards using the DC plug on Arduino Mega2560.
Note that with this configuration you can no longer connect Arduino to a pc via the USB port. For programming and debugging, you need to use the WiFi connection by choosing the “Arduino Mega2560 – Dragino Yun” board on the IDE boards list.