www.dragino.com Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14



Similar documents
Yun Shield User Manual VERSION: 1.1. Yun Shield User Manual 1 / 32.

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

DT01 WiFi/3G VoIP PBX / ATA User Manual

Board also Supports MicroBridge

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

MediaTek LinkIt Smart 7688 FAQ

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

GM862 Arduino Shield

Wireless Security Camera with the Arduino Yun

1 Serial RS232 to Ethernet Adapter Installation Guide

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:

vyacht Wifi Router vyacht yacht automation About this manual

CPSC 226 Lab Nine Fall 2015

A REST API for Arduino & the CC3000 WiFi Chip

Internet of Things with the Arduino Yún

Workshop Intel Galileo Board

Ultra Thin Client TC-401 TC-402. Users s Guide

MeshBee Open Source ZigBee RF Module CookBook

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

3.5 EXTERNAL NETWORK HDD. User s Manual

Follow these steps to prepare the module and evaluation board for testing.

Cypress Semiconductor: Arduino Friendly PSoC Shield

FLYPORT Wi-Fi G

Ethernet Radio Configuration Guide

Option nv, Gaston Geenslaan 14, B-3001 Leuven Tel Fax Page 1 of 14

Prototyping Connected-Devices for the Internet of Things. Angus Wong

Startup guide for Zimonitor

WBS210/WBS510 Datasheet

Custom Integration Solutions

ESP8266 WiFi Module Quick Start Guide

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

CDH installation & Application Test Report

RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application

802.11n Wireless Broadband Router WNRT-625

Arduino Lesson 1. Blink

TDP43ME NetPS. Network Printer Server. Control Center. for Ethernet Module

System Area Manager. Remote Management

PN532 NFC RFID Module User Guide

WLAN Outdoor CPE For 2.4G. Quick Installation Guide

Debugging Network Communications. 1 Check the Network Cabling

How To Use 1Bay 1Bay From Awn.Net On A Pc Or Mac Or Ipad (For Pc Or Ipa) With A Network Box (For Mac) With An Ipad Or Ipod (For Ipad) With The

ALL0237R. Wireless N 300Mbit Access Point/Repeater. User s Manual

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

Datasheet. Advanced Network Routers. Models: ERPro-8, ER-8, ERPoe-5, ERLite-3. Sophisticated Routing Features

RIU-IP Remote IP Interface User Guide

How To Set Up Ops Cser.Com (Pros) For A Pc Or Mac) With A Microsoft Powerbook (Proos) (Prosecco) (Powerbook) (Pros) And Powerbook.Com/

Shield Pro. Quick Start Guide

Honeywell Internet Connection Module

Gigabyte Management Console User s Guide (For ASPEED AST 2400 Chipset)

mypro Installation and Handling Manual Version: 7

PePWave Surf Series PePWave Surf Indoor Series: Surf 200, AP 200, AP 400

Wireless Communication With Arduino

EdgeRouter Lite 3-Port Router. Datasheet. Model: ERLite-3. Sophisticated Routing Features. Advanced Security, Monitoring, and Management

WISE-4000 Series. WISE IoT Wireless I/O Modules

TMA Management Suite. For EAD and TDM products. ABOUT OneAccess. Value-Adding Software Licenses TMA

EZblue BusinessServer The All - In - One Server For Your Home And Business

TE100-P21/TEW-P21G Windows 7 Installation Instruction

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Management Software. Web Browser User s Guide AT-S106. For the AT-GS950/48 Gigabit Ethernet Smart Switch. Version Rev.

Unpacking the Product. Rack Installation. Then, use the screws provided with the equipment rack to mount the firewall in the rack.

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

Comtrend 1 Port Router Installation Guide CT-5072T

Waspmote. Quickstart Guide

INTRODUCTION TO SERIAL ARM

Bluetooth for device discovery. Networking Guide

P-2612HNU-Fx n ADSL2+ VoIP IAD DEFAULT LOGIN DETAILS. Firmware V3.00 Edition 1, 1/2010. Password: 1234 User Name: admin Password: 1234

IRF2000 IWL3000 SRC1000 Application Note - Develop your own Apps with OSGi - getting started

EZblue BusinessServer The All - In - One Server For Your Home And Business

Getting Started Guide with WIZ550web

1 Mi kołaj Z Mik ar ołaj Z zyc arzy ki cki

Build SalesForce IoT applications with ARM mbed

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

Lab Experiment 1: The LPC 2148 Education Board

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

TUTORIAL 3 :: ETHERNET SHIELD AND TWITTER.COM

Embedded Based Web Server for CMS and Automation System

801.11n Wireless Broadband Router

Gigabyte Content Management System Console User s Guide. Version: 0.1

BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

Installation Guide. Before We Begin: Please verify your practice management system is compatible with Dental Collect Enterprise.

Site Monitor. Version 5.3

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

Demo of Data transferring (.CSV Files) from EGX300 to Our local PC/Laptop using- FTP

Arduino Internet Connectivity: Maintenance Manual Julian Ryan Draft No. 7 April 24, 2015

N300 WiFi Range Extender

Quick Installation Guide

Innovative Electronics for a Changing World INDEX

Arduino Lesson 5. The Serial Monitor

Hands-on MESH Network Exercise Workbook

Online Monitoring User Guide

Using IDENT M System T with Modbus/TCP

MCB3101 (Class I) WiRobot Serial Bluetooth Wireless Module User Manual

Configuration Guide - OneDesk to SalesForce Connector

User s Manual CONTENT. Nano NAS Server for USB storages. 1. Product Information Product Specifications System requirements..

CM500 High Speed Cable Modem User Manual

An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform)

3.1 RS-232/422/485 Pinout:PORT1-4(RJ-45) RJ-45 RS-232 RS-422 RS-485 PIN1 TXD PIN2 RXD PIN3 GND PIN4 PIN5 T PIN6 T PIN7 R+ PIN8 R-

Quick Start Guide. Cisco Small Business. 200E Series Advanced Smart Switches

GPS NTP Time Server for Intranet Networks DIN RAIL Version

Transcription:

Yun Shield Quick Start Guide VERSION: 1.0 Version Description Date 1.0 Release 2014-Jul-08 Yun Shield Quick Start Guide 1 / 14

Index: 1 Introduction... 3 1.1 About this quick start guide... 3 1.2 What is Yun Shield... 3 1.3 Specifications... 3 1.4 Features... 4 1.5 System Structure... 5 2 Set up and use Yun Shield... 7 2.1 Connect to Leonardo and power... 7 2.2 Connect to Yun Shield... 7 2.3 Set Up Yun Shield to access internet... 8 2.4 Detect Yun Shield... 8 2.5 Upload Sketch... 9 2.6 Bridge Library... 9 3 Examples... 10 3.1 Example 1: Say hello to Linux... 10 3.2 Example 2: Upload data to IoT Server... 12 Yun Shield Quick Start Guide 2 / 14

1 Introduction www.dragino.com 1.1 About this quick start guide This is a quick start guide to introduce what is Yun Shield and how to use Yun Shield with Arduino Leonardo and run simple Bridge examples. For more detail about Yun Shield system other features or use with other Arduino boards. Please refer the Yun Shield User Manual. 1.2 What is Yun Shield Yun Shield is one of the most powerful shields for Arduino Board. Yun Shield is designed to solve the Internet connectivity and storage issue for Arduino Board. Yun Shield runs Open Source OpenWrt system (Same system as runs in Arduino Yun) and it is fully compatible with Arduino IDE v1.5.4 or later. Yun Shield is the ideally choice for Arduino Projects which require various internet connections and more storage. Basically, Yun Shield + Leonardo equally to the official Arduino Yun, but Yun Shield is more flexible because it can work with other Arduino board such as Uno, Duemilanove, Mega etc. And Yun Shield uses external wifi antenna which provides stability and possibility for various environments. 1.3 Specifications Processor: 400MHz, 24K MIPS Flash: 16MBytes RAM: 64MBytes Power Input: 4.75v ~ 23v via Arduino VIN pin 1 x 10M/100M RJ45 connector 150M WiFi 802.11 b/g/n External Antenna via I-Pex connector 1 x USB 2.0 host connector, used for USB storage or 3G connection Yun Shield Quick Start Guide 3 / 14

1 x Reset button Compatible with 3.3v or 5v I/O Arduino. www.dragino.com 1.4 Features Open source Linux (OpenWrt) inside Low power consumption Compatible with Arduino IDE 1.5.4 or later, user can program, debug or upload sketch to Arduino board via Arduino IDE. Managed by Web GUI, SSH via LAN or WiFi Software upgradable via network Built-in web server Support internet connection via LAN port, WiFi or 3G dongle. Support USB flash to provide storage for Arduino projects. Failsafe design provides robustly system. Compatible with Arduino Leonardo, Uno, Duemilanove, Diecimila, Mega Yun Shield Quick Start Guide 4 / 14

1.5 System Structure www.dragino.com RJ45 Yun Shield SPI Failsafe Button WiFi Dragino HE module UART Arduino Leonardo, UNO, USB Host VIN +5V POWER: The Dragino HE is the core module of Yun Shield. The HE module requires around 200ma current when in full load, so it is powered by the Arduino VIN pins to avoid overheated in the Arduino onboard 5v LDO. So when Yun shield is in used, the Arduino board should be powered by DC port instead of USB port. The DC input can be 7v ~ 15v. Yun Shield Quick Start Guide 5 / 14

The USB Host of Yun Shield gets power from the Arduino +5v pin, since the +5v from Arduino comes from the +5V LDO, to avoid overheated on the Arduino Board, when the USB host is in used, it is recommended to use +7v DC. Interface: The RJ45, WiFi, USB Host and Failsafe are connected to the Dragino HE module directly. And the Dragino HE module use SPI and UART to communicate with Arduino Board. Yun Shield is compatible with 3.3v and 5v Arduino board. The on board jumper SV1 is used to set the SPI and UART to 3.3v or 5v level. The SPI interface is used to upload the sketches comes from the Arduino IDE. SPI interface only connects to Dragino HE during uploading so the Arduino SPI can still be used to connect to other SPI slave devices. The UART interface is used for the Bridge class in Arduino, there are lots of examples explain how to use the bridge class in the Arduino IDE. It is the core of Yun solution. We must make sure the serial Interface of Arduino is not used by other hardware. Yun Shield Quick Start Guide 6 / 14

2 Set up and use Yun Shield 2.1 Connect to Leonardo and power Simply put the Yun Shield on the top of Arduino Leonardo and Power the Leonardo via the DC Jack. 2.2 Connect to Yun Shield At the first boot of Yun Shield, it will auto generate an unsecure WiFi network call Dragino2-xxxxxx User can use their laptop to connect to this WiFi network. The laptop will get an IP 192.168.240.xxx and the Yun Shield has the default IP 192.168.240.1 Once user joins the network, they can use web browser (recommend Firefox and Chrome) and enter 192.168.240.1 to enter the Yun Shield setting page. Default Password for Yun Shield is Arduino. Yun Shield Quick Start Guide 7 / 14

2.3 Set Up Yun Shield to access internet After log in, the GUI will show the WIFI / ETH interface status. Click the Configure button and now user can configure Yun Shield to access internet via your WiFi router. Select WiFi network and key in the password to connect your wifi router 2.4 Detect Yun Shield Assume your laptop and Yun Shield are in the same network. The Yun Shield will broadcast data in this network and Arduino IDE will receive this data and show the Yun Shield in ToolsPort. Yun Shield Quick Start Guide 8 / 14

2.5 Upload Sketch 1) In the Arduino IDE, choose the Arduino Yun board type for Leonardo. 2) In Arduino IDE port, choose the correct port. (should be Arduino Yun port with an ip address) 3) In the Yun Shield GUI Sensor page, choose the Board Type: Leonardo 4) Compile the sketch and upload it to the Arduino Board. During upload, The Yun Shield will ask you to key in the password, by default, the password is arduino. 2.6 Bridge Library The Bridge Library simplifies the communication between the Arduino Board and Yun Shield. Bridge commands from the AVR (Arduino Board) are interpreted by Python on the Yun Shield. Its role is to execute programs on the GNU/Linux side when asked by Arduino, provide a shared storage space for sharing data like sensor readings between the Arduino and the Internet, and receiving commands from the Internet and passing them directly to the Arduino. There are detail explain and lots of example to show how to use Bridge in the Arduino Official Website. Reference link is: http://arduino.cc/en/reference/yunbridgelibrary and there are two examples in next chapter. Yun Shield Quick Start Guide 9 / 14

3 Examples 3.1 Example 1: Say hello to Linux Introduction: This example is a hello test between the Arduino and Yun Shield. The example can be found on the Arduino IDE--> File --> Examples --> Bridge --> ConsoleRead. Tutorial of this example can be found on http://arduino.cc/en/tutorial/consoleread. Below listing the code and add some detail to understand it with the Yun Shield: Code: #include <Console.h> //use Console class for Arduino IDE debug over WiFi, similar to Serial class, String name; void setup() { // Initialize Console and wait for port to open: Bridge.begin(); Console.begin(); // Wait for Console port to connect while (!Console); Console.println("Hi, what's your name?"); //Data flow: Arduino --> Yun Shield --> Arduino IDE void loop() { if (Console.available() > 0) { char c = Console.read(); //read the next char received, data flow: IDE --> Yun Shield--> Arduino // look for the newline character, this is the last character in the string if (c == '\n') { //print text with the name received Console.print("Hi "); Console.print(name); Console.println("! Nice to meet you!"); Console.println(); // Ask again for name and clear the old name Console.println("Hi, what's your name?"); name = ""; // clear the name string else { // if the buffer is empty Cosole.read() returns -1 name += c; // append the read char from Console to the name string Screen Shot: Yun Shield Quick Start Guide 10 / 14

Yun Shield Quick Start Guide 11 / 14

3.2 Example 2: Upload data to IoT Server www.dragino.com Introduction: This example shows how to log data to the public IoT server Xively. The example is a modified version(change Serial to Console to fit for different Arduino Board and debug over WiFi) from Arduino IDE--> File --> Examples --> Bridge --> XivelyClient. Tutorial of this example can refer http://arduino.cc/en/tutorial/yunxivelyclient. Before upload the sketch, make sure: The Yun Shield already has internet access Input your FEED ID and API KEY according to the Tutorial. Note, The FEED ID should be within double quotation marks. Change Serial Class to Console class to fit for different AVRs. Below listing the code and add some detail to understand it with the Yun Shield: Code: // include all Libraries needed: #include <Process.h> //Process lib use to call Linux Commands in Yun Shield #include <Console.h> //Console lib, used to show debug info in Arduino IDE #include "passwords.h" // contains my passwords, see below /* NOTE: passwords.h is not included with this repo because it contains my passwords. You need to create it for your own version of this application. To do so, make a new tab in Arduino, call it passwords.h, and include the following variables and constants: #define APIKEY "foo" // replace your pachube api key here #define FEEDID 0000 // replace your feed ID #define USERAGENT "my-project" // user agent is the project name */ // set up net client info: const unsigned long postinginterval = 60000; //delay between updates to xively.com unsigned long lastrequest = 0; // when you last made a request String datastring = ""; void setup() { // start console: Bridge.begin(); Console.begin(); while (!Console); // wait for Network Serial to open Console.println("Xively client"); // Do a first update immediately updatedata(); senddata(); lastrequest = millis(); void loop() { // get a timestamp so you can calculate reading and sending intervals: long now = millis(); Yun Shield Quick Start Guide 12 / 14

// if the sending interval has passed since your // last connection, then connect again and send data: if (now - lastrequest >= postinginterval) { updatedata(); senddata(); lastrequest = now; void updatedata() { // convert the readings to a String to send it: datastring = "Temperature,"; datastring += random(10) + 20; // add pressure: datastring += "\npressure,"; datastring += random(5) + 100; // this method makes a HTTP connection to the server: void senddata() { // form the string for the API header parameter: String apistring = "X-ApiKey: "; apistring += APIKEY; // form the string for the URL parameter: String url = "https://api.xively.com/v2/feeds/"; url += FEEDID; url += ".csv"; // Send the HTTP PUT request, form the linux command and use Process Class to send this command to Yun Shield // Is better to declare the Process here, so when the // senddata function finishes the resources are immediately // released. Declaring it global works too, BTW. Process xively; Console.print("\n\nSending data... "); xively.begin("curl"); xively.addparameter("-k"); xively.addparameter("--request"); xively.addparameter("put"); xively.addparameter("--data"); xively.addparameter(datastring); xively.addparameter("--header"); xively.addparameter(apistring); xively.addparameter(url); xively.run(); Console.println("done!"); // If there's incoming data from the net connection, // send it out the Console: while (xively.available() > 0) { char c = xively.read(); Console.write(c); Yun Shield Quick Start Guide 13 / 14

Screen Shot: Xively Dashboard Yun Shield Quick Start Guide 14 / 14