Start with Arduino Tian

First steps for Mac user only:

If you are a Mac user then follow these steps: 
- Don't plug the board to PC; 
- Install the drivers using the Arduino IDE: 
1) Download the Arduino IDE 1.7.10 or later. Click here
2) Launch the software. 
3) Click on Install Driver from Tools menu, as shown in the below image. 

Installation Driver  for only Mac users 

It will open the installation procedure, click on Continue and run the instructions. 

Driver setup 

- Completed the driver installation then plug your board to PC and continue to follow the guide.

Configuration guide

This guide will show, step by step, how to configure, the first time, your Arduino Tian.

The board must be powered with one power supply that provides output at least 2A. For connecting it to your computer you may need to use a Y-Cable (USB Micro-B to Standard Male A).

Now that the board is powered, after about twenty seconds, search your Arduino board between the WiFi networks available on your PC. 

Network list 

Note: If you would reset the Arduino’s Wifi you must press the wlan reset button (WLAN RST) for 5-30 seconds.

Connect your computer to the board hotspot. 
Open a web browser and write the follow address http://arduino.local or the ip address http://192.168.240.1in the address bar. 
After a few moments, a web page will appear asking for a password. 

OS.JS 
Login OS.JS 
Enter default password: arduino 
and click Login button. 
Now, you are in Arduino OS, and it will start the Arduino Configuration wizard that it will help you, step by step, to configure your board. 

Arduino Configuration wizard 
Give an unique Name, choose your Password (8 or more characters) and select your Timezone/country. It is recommended to set these options as it may help connecting to local WiFi networks. Setting the local timezone also selects the country's regulatory domain. 
If you leave this field blank, the system retains the default arduino password. 
When you finish then click on Next. 

Board settings 
Select your Wireless Network and type the network password. Click Next to continue the configuration. 

Wireless settings 

You will see toggles for changing the access of Reset API, 1 ON - 0 OFF. 

Rest Api Settings 

REST is an acronym for "Representational State Transfer". It is a software architecture that exposes various parts of the Arduino hardware through URLs. 
By default, the REST API access is password protected. It is possible to change this to access the services without a password, clicking on Open. 



After that you have completed click “Save”. 



Wait the end operation. 
Now connect your PC to the same network of Tian and access to your board typing the hostname.local/ oripaddress on the bar: 



If you can reach your board then you have correctly configured it: 

Home page


Follow all steps of this guide to upload your first sketch on Arduino Tian.

Arduino IDE - download and install

First you need the Arduino.org IDE. 
You can download it from here
After that you have downloaded the latest version Arduino IDE, extract it using 7-zip. 
Now double click to install it, if you have downloaded the installer file. 
Note: 
Keep in mind that to use your Arduino Tian you need the Arduino.org IDE 1.7.10 or later.

Lauch the Arduino IDE

Open the Arduino folder and double-click on the Arduino application. 
Lauch Arduino IDE 
Arduino IDE 
Warning: 
If you are a Windows user and you have downloaded the administrator version then you need to click on right button of mouse and select the voice "Execute as administrator", to start the program.

Drivers installation for Mac user only:

If you are a Mac user then follow these steps: 
- Don't plug the board to PC; 
- Install the drivers using the Arduino IDE: 
1) Download the Arduino IDE 1.7.10 or later. Click here
2) Launch the software. 
3) Click on Install Driver from Tools menu, as shown in the below image. 
Installation driver for Mac users only 
It will open the installation procedure, click on Continue and run the instructions. 
Driver settings 
- Completed the driver installation then plug your board to PC and continue to follow the guide.

Connect the board

The board must be powered with one power supply that provides output at least 2A. 
For connecting it to your computer you may need to use a Y-Cable (USB Micro-B to Standard Male A). 
Arduino Tian 
The green power LEDs (labelled MCU ON and LNX ON) should go on.

Upload sketch

The Arduino Tian can be programmed in two way: via Serial or via OTA, both these methods will be shown in this guide.

Programming via Serial

This is the classic procedure used to program all Arduino boards.

Select the board

Select the Arduino Tian as board from Tools>Board menu. 
Board menu

Select port

If the board is correctly connected to PC then it appear in Tool>Port menu a device called COMxx(Arduino Tian-Programming Port) as shown in the below image, then select it: 
Port menu 
Note: 
The Arduino Tian has an USB port but when it is connected to the computer then they appear two ports:Programming Port and Console Port. 
One it is used to programm the Microcontroller(Programming Port) and the other for the linux console.

Select the Blink sketch from File>Examples>1.Basics menu. 
Examples menu

Upload the sketch

Now you can upload the sketch, clicking on Upload button as shown in the below image: 
Blink sketch 
Wait that the operation is completed. 
Blink sketch uploaded

Programming via OTA

Power the board, for example connected it to PC using the USB cable or using an external power. 
Connect the PC on the same board network. 
Now the procedure to program the board via OTA is the same of that shown above but it differs only when you select the port since now you must select the board from network ports menu. 
Below all steps:

Select the board

Select the Arduino Tian as board from Tools>Board menu. 
Board menu

Select port

Select the board from Tool>Port>Network ports menu it will appear as a device called hostname at XXX.XXX.XXX.XXX (Arduino Tian) as shown in the below image: 
Network ports list

Select the Blink sketch from File>Examples>1.Basics menu. 
Examples menu

Upload the sketch

Now you can upload the sketch, clicking on Upload button, as shown in the below image: 
Blink sketch 

Type the Arduino Tian password when it is required: 

Arduino UNO WiFi password 

Wait that the operation is completed. 

Blink sketch uploaded 

If the Uploading is correctly completed then the Led13 will blink each second.

Now try to upload another example or to create your custom sketch.

Look these other sketches:

Differences from the Arduino YUN

The Arduino Tian is a new board that it has, as Arduino Yun, a WiFi module and a MIPS Linux.

The main differences between the two boards are here summarized: 
- The Tian use the ARM Microcontroller SAMD21G18 (Operating voltage 3.3V, SRAM 32KB and Flash memory 256KB) while the Yun use the AVR Microcontroller ATmega 32u4 (Operating voltage 5, SRAM 2.5KB and Flash memory 32KB). 
- Also the MIPS are different. The Tian mounts the Atheros AR9342 to 560 MHz while the Yun uses the Atheros AR9331 to 400 MHz. 
- Other differences are that the Tian board has Bluethoot 4.0 technology and it has 4GB eMMC memory.

- Also the Wifi module is different. The Arduino Tian has IEEE802.11n 2x2 2.4/5 GHz dualband. Arduino Tian

So as the Arduino Yun also Tian has three reset buttons one for microcontroller, one for WiFi, and one for MIPS processor.

There are eight status LEDs on the Tian that indicate:TX UART SAMD21, RX UART SAMD21, POWER, WLAN, USB, LED ACT, LED 10/100 and LED 13, as shown in the picture. Arduino Tian description

 

OpenWrt LininoOS

LininoOS is based on OpenWRT distribution with about 3000 package built and available. LininoOS provides a fully writable filesystem with package management with GPG signature. Integrated with LininoIO it is a complete linux system for IoT space. 
LininoOS features many innovations for your Arduino Tian.

  • LininoIO is a software framework able to integrate microcontroller features inside the microprocessor environment. You can simply write your application using Node.js, Python, Bash, etc., on linux side using LininoOS to control completely the board and all the devices attacched.
  • Node.js with Ideino Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Ideino is an embedded editor to write and debug your node.js application.
  • All Joyn supported, which is an open source project which provides a universal software framework and core set of system services that enable interoperability among connected products and software applications to create dynamic proximal networks.

Python

An installation of Python 2.7 is included with LininoOS, which you can use to write applications or scripts. 
For more on Python, visit the Python 2.7 documentation pages.

Install additional software on Linux

The Tian comes with several pieces of software pre-installed on LininoOS, including "curl" and "python". You may want to install other software on the Tian. On Linux systems, additional software can be installed using a tool called the "opkg". 
You can find pre-compiled packages for LininoOS on their latest version, here.

Resetting the processors (AR9342, WiFi, and SAMD21)

To restart the AR9342, which reboots LininoOS, press the "AR9342 Reset" button. 
To restart the SAMD21 and restart the currently installed Arduino sketch, tap the button "SAMD21 Reset" one times. 
To reset Wifi there is a button and when you press the "WiFi Reset" button, the WLAN LED will flash.

Arduino Tian description


If you move to a different network and can no longer wirelessly access the Tian through its web interface, you can reset the Tian's network configuration by pressing the WiFi reset button (WLAN RST) for longer longer than 5 seconds, but less than 30, the AR9331 processor will reboot. The WiFi configuration will be reset and the Industrial 101 will start its own WiFi network Linino-XXXXXXXXXXXX. Any other modification/configuration will be retained.

To reset the LininoOS distribution to its default state, press the WiFi reset button (WLAN RST) for at least 30 seconds. The board reverts to the original settings: like just taken out of the box or to the latest update of the LininoOS image you have reflashed before. Among other things, this removes all installed files and network settings.

Serial re-enumeration on reset.

Since the Tian does not have a dedicated chip to handle serial communication, it means that the serial port is virtual — it's a software routine, both on your operating system, and on the board itself. Just as your computer creates an instance of the serial port driver when you plug in any Arduino, the SAMD21 creates a serial instance whenever it runs its bootloader. The board is an instance of USB's Connected Device Class (CDC) driver. 
This means that every time you reset the SAMD21 processor, the USB serial connection will be broken and re-established. The board will disappear from the list of serial ports, and the list will re-enumerate. Any program that has an open serial connection to the Tian will lose its connection. This is in contrast to the Arduino Uno, with which you can reset the main processor (the ATmega328P) without closing the USB connection (which is maintained by the secondary ATmega8U2 or ATmega16U2 processor). This difference has implications for driver installation, uploading, and communication.

No reset when you open the serial port.

The Tian won't restart your sketch when you open a serial port on the computer. That means you won't see serial data that's already been sent to the computer by the board, including, for example, most data sent in setup(). 
This also applies to the Console, described below.

This means that if you're using any Serial or Console print(), println() or write() statements in setup(), they won't show up when you open the serial monitor or Console connection. To work around this, you can check to see if the port is open like so:

//stops the program until Serial Monitor is opened   while (!Serial) ;
or
// stops the program until Console is opened   while (!Console) ;

Configuring the on board WiFi

Programming the SAMD21 over WiFi 
If you Tian is in your computer's same network, you can upload a sketch using the Wireless Connection. 
After configuring your board, connect it to the network that you have specified in the configuration settings. Open the Arduino IDE. 
Under the Tools > Port menu, you should see an entry that lists your Tian's name and its IP address. Under the Board menu, select Arduino Tian. 
Open the Blink example (File > Examples > 01Basics > Blink) and upload the sketch to the board. You will be prompted for the administrator password. Use the one you entered in the configuration screen. 
Once the program is uploaded, the SAMD21 processor will restart. You should see the LED connected to pin 13 blinking. 
Using the onboard Ethernet (via dogEthernet) 
When you connect the Tian to a wired network with an ethernet cable, it will try to connect automatically via DHCP. The board will show up on the ports menu just as it would over WiFi. 
If you want to connect the Industrial101 directly to your computer, either configure the computer's interfaces to have a static IP address, or act as a DHCP server.

NB: the ethernet interface is eth1, not eth0