Working as an Arduino Yun

LinkIt Smart 7688 Duo development board can also facilitate development with Arduino Yun Bridge library to a certain extent.

Enabling the Bridge library

Configure the board to run Bridge related services. You’ll also need to set the system console to map to /dev/ttyS0 for the Arduino side to issue commands to the Linux system. Luckily, the default system image of the LinkIt Smart 7688 Duo development board wraps all the aforementioned configurations into a single UCI configuration. All you need to do is to enable it. Enter the following commands in the system console and reboot the system: 

uci set yunbridge.config.disabled='0'  
uci commit  
reboot  

Running Arduino Yun examples

The system is now ready to accept commands from the Arduino IDE. Connect the board to you computer and open Arduino IDE, then click File, then Examples. Navigate to Bridge and then TimeCheck. Next, upload the TimeCheck example sketch to the board and launch the Serial Monitor. The following is an output on the Serial Monitor.

Time Check  
00:00:00  
03:42:05  
03:42:06 

The output timestamp should be the same as the Linux system timestamp. You can also try other examples of the Bridge library. Note that some scripts and services may act differently on the default system image, so you may need to modify the sketch files accordingly.

Disabling the Bridge library

Note that while the system is configured to work with the Bridge library, the /dev/ttyS0 is occupied by the Bridge library and it is not advised to try accessing it when in use. For example, Firmata won’t work when the system is configured to support the Bridge library. To release the Bridge related services and occupying /dev/ttyS0, use the following commands in the system console then reboot the system:

uci set yunbridge.config.disabled='1'  
uci commit  
reboot 

Using the Bridge console

The Yun Bridge's Console class enables to output messages to Arduino Serial Monitor through network. To do this, make sure your host computer (that runs Arduino IDE) is in the same local area network as LinkIt Smart 7688 Duo development board. You can then select the "network port" from the port menu in Arduino IDE.