Browse over 10,000 Electronics Projects

Adding Internet connectivity to Arduino boards and apps with the YUN Shield

Adding Internet connectivity to Arduino boards and apps with the YUN Shield

Using the Yun shield with Arduino modules

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:

  • The Arduino module must be powered by the DC connector and not by the USB connector;
  • The jumper of SPI and UART voltage levels must be set properly;
  • The right “shield – Arduino module” coupling must be properly configured in IDE settings (we’ll see later on how to do it).
  • The UART and SPI ports must not be used by other programs;
  • Make sure that the “Linux Console / Arduino Bridge” mode is set (in “Sensor >> PowerUART” menu on the configuration tool)

 

 

Connect the shield to Arduino UNO

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. 



Advertisement1


Fig3

 

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.

 

Connect the shield to Arduino Mega2560

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. 

 

Fig4

 

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.

 

Pages: 1 2 3 4 5 6 7 8 9

 


Top