Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/.gitattributes
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/.gitattributes	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/.gitattributes	(revision 227)
@@ -0,0 +1,22 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs     diff=csharp
+*.sln    merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc	 diff=astextplain
+*.DOC	 diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot  diff=astextplain
+*.DOT  diff=astextplain
+*.pdf  diff=astextplain
+*.PDF	 diff=astextplain
+*.rtf	 diff=astextplain
+*.RTF	 diff=astextplain
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/.gitignore
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/.gitignore	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/.gitignore	(revision 227)
@@ -0,0 +1,215 @@
+#################
+## Eclipse
+#################
+
+*.pydevproject
+.project
+.metadata
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.classpath
+.settings/
+.loadpath
+
+# External tool builders
+.externalToolBuilders/
+
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# CDT-specific
+.cproject
+
+# PDT-specific
+.buildpath
+
+
+#################
+## Visual Studio
+#################
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+
+[Dd]ebug/
+[Rr]elease/
+x64/
+build/
+[Bb]in/
+[Oo]bj/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.log
+*.scc
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.Publish.xml
+*.pubxml
+
+# NuGet Packages Directory
+## TODO: If you have NuGet Package Restore enabled, uncomment the next line
+#packages/
+
+# Windows Azure Build Output
+csx
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+sql/
+*.Cache
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.[Pp]ublish.xml
+*.pfx
+*.publishsettings
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+App_Data/*.mdf
+App_Data/*.ldf
+
+#############
+## Windows detritus
+#############
+
+# Windows image file caches
+Thumbs.db
+ehthumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Mac crap
+.DS_Store
+
+
+#############
+## Python
+#############
+
+*.py[co]
+
+# Packages
+*.egg
+*.egg-info
+dist/
+build/
+eggs/
+parts/
+var/
+sdist/
+develop-eggs/
+.installed.cfg
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+
+#Translations
+*.mo
+
+#Mr Developer
+.mr.developer.cfg
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/License.txt
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/License.txt	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/License.txt	(revision 227)
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Seeed Technology Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/README.md
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/README.md	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/README.md	(revision 227)
@@ -0,0 +1,35 @@
+Grove_Ultrasonic_Ranger
+--------------------------------
+
+[![Grove_Ultrasonic_Ranger](http://www.seeedstudio.com/wiki/images/thumb/3/3a/Ultrasonic_Ranger.jpg/300px-Ultrasonic_Ranger.jpg)](http://www.seeedstudio.com/depot/grove-ultrasonic-ranger-p-960.html?cPath=144_149)
+
+This Grove - ultrasonic sensor is a non-contact distance measurement module which works at 42KHz, suitable for projects that require middle distance measurement. 
+
+### Usage:
+
+1. Clone this repo or download as a zip;
+2. Unzip the zip file if you downloaded a zip file;
+3. Remove the string "-master" if you download as a zip file;
+4. Copy the directory "Grove_Ultrasonic_Ranger" into Arduino's libraries directory;
+5. Open Arduino IDE, go to "File"->"Examples"->"Grove_Ultrasonic_Ranger"
+
+Assume that you connected the grove correctly. 
+
+For connection guide and more information, please refer to [wiki page](http://www.seeedstudio.com/wiki/Grove_-_Ultrasonic_Ranger).
+
+    
+----
+
+This software is written by L.G. for for [Seeed Technology Inc.](http://www.seeed.cc) and is licensed under [The MIT License](http://opensource.org/licenses/mit-license.php). Check License.txt/LICENSE for the details of MIT license.<br>
+
+Contributing to this software is warmly welcomed. You can do this basically by<br>
+[forking](https://help.github.com/articles/fork-a-repo), committing modifications and then [pulling requests](https://help.github.com/articles/using-pull-requests) (follow the links above<br>
+for operating guide). Adding change log and your contact into file header is encouraged.<br>
+Thanks for your contribution.
+
+Seeed is a hardware innovation platform for makers to grow inspirations into differentiating products. By working closely with technology providers of all scale, Seeed provides accessible technologies with quality, speed and supply chain knowledge. When prototypes are ready to iterate, Seeed helps productize 1 to 1,000 pcs using in-house engineering, supply chain management and agile manufacture forces. Seeed also team up with incubators, Chinese tech ecosystem, investors and distribution channels to portal Maker startups beyond.
+
+
+[![Analytics](https://ga-beacon.appspot.com/UA-46589105-3/Grove_Ultrasonic_Ranger)](https://github.com/igrigorik/ga-beacon)
+
+
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/Ultrasonic.cpp
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/Ultrasonic.cpp	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/Ultrasonic.cpp	(revision 227)
@@ -0,0 +1,72 @@
+/*
+ * Ultrasonic.cpp
+ * A library for ultrasonic ranger
+ *
+ * Copyright (c) 2012 seeed technology inc.
+ * Website    : www.seeed.cc
+ * Author     : LG, FrankieChu
+ * Create Time: Jan 17,2013
+ * Change Log :
+ *
+ * The MIT License (MIT)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+#include "Arduino.h"
+#include "Ultrasonic.h"
+
+Ultrasonic::Ultrasonic(int pin)
+{
+	_pin = pin;
+}
+/*The measured distance from the range 0 to 400 Centimeters*/
+long Ultrasonic::MeasureInCentimeters(void)
+{
+	pinMode(_pin, OUTPUT);
+	digitalWrite(_pin, LOW);
+	delayMicroseconds(2);
+	digitalWrite(_pin, HIGH);
+	delayMicroseconds(5);
+	digitalWrite(_pin,LOW);
+	pinMode(_pin,INPUT);
+	long duration;
+	duration = pulseIn(_pin,HIGH);
+	long RangeInCentimeters;
+	RangeInCentimeters = duration/29/2;
+	return RangeInCentimeters;
+}
+/*The measured distance from the range 0 to 157 Inches*/
+long Ultrasonic::MeasureInInches(void)
+{
+	pinMode(_pin, OUTPUT);
+	digitalWrite(_pin, LOW);
+	delayMicroseconds(2);
+	digitalWrite(_pin, HIGH);
+	delayMicroseconds(5);
+	digitalWrite(_pin,LOW);
+	pinMode(_pin,INPUT);
+	long duration;
+	duration = pulseIn(_pin,HIGH);
+	long RangeInInches;
+	RangeInInches = duration/74/2;
+	return RangeInInches;
+}
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/Ultrasonic.h
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/Ultrasonic.h	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/Ultrasonic.h	(revision 227)
@@ -0,0 +1,46 @@
+/*
+ * Ultrasonic.h
+ * A library for ultrasonic ranger
+ *
+ * Copyright (c) 2012 seeed technology inc.
+ * Website    : www.seeed.cc
+ * Author     : LG, FrankieChu
+ * Create Time: Jan 17,2013
+ * Change Log :
+ *
+ * The MIT License (MIT)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#ifndef Ultrasonic_H
+#define Ultrasonic_H
+
+#include "Arduino.h"
+
+class Ultrasonic
+{
+	public:
+		Ultrasonic(int pin);
+		long MeasureInCentimeters(void);
+		long MeasureInInches(void);
+	private:
+		int _pin;//pin number of Arduino that is connected with SIG pin of Ultrasonic Ranger.
+};
+
+#endif
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/examples/UltraDisOnSeeedSerialLcd/UltraDisOnSeeedSerialLcd.ino
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/examples/UltraDisOnSeeedSerialLcd/UltraDisOnSeeedSerialLcd.ino	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/examples/UltraDisOnSeeedSerialLcd/UltraDisOnSeeedSerialLcd.ino	(revision 227)
@@ -0,0 +1,65 @@
+/*
+ * UltraDisOnSeeedSerialLcd.ino
+ * Example sketch for ultrasonic ranger
+ *
+ * Copyright (c) 2012 seeed technology inc.
+ * Website    : www.seeed.cc
+ * Author     : LG, FrankieChu
+ * Create Time: Jan 17,2013
+ * Change Log :
+ *
+ * The MIT License (MIT)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+
+/***************************************************************************/
+//  Function: Measure the distance to obstacles in front and display the
+//			  result on seeedstudio serialLcd. Make sure you installed the
+//			  serialLCD, SofewareSerial and Ultrasonic library.
+//	Hardware: Grove - Ultrasonic Ranger, Grove - Serial LCD
+//	Arduino IDE: Arduino-1.0
+/*****************************************************************************/
+
+
+#include <SoftwareSerial.h>
+#include <SerialLCD.h>
+#include "Ultrasonic.h"
+
+SerialLCD slcd(4,5);
+Ultrasonic ultrasonic(7);
+void setup()
+{
+   slcd.begin();
+}
+void loop()
+{
+	long RangeInCentimeters;
+	RangeInCentimeters = ultrasonic.MeasureInCentimeters();
+	delay(150);
+	slcd.clear();
+	slcd.setCursor(0,0);
+	slcd.print("The distance:");
+	slcd.setCursor(0,1) ;
+	slcd.print(RangeInCentimeters,DEC);
+	slcd.setCursor(5,1) ;
+	slcd.print("cm");
+}
+
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/examples/UltrasonicDisplayOnTerm/UltrasonicDisplayOnTerm.ino
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/examples/UltrasonicDisplayOnTerm/UltrasonicDisplayOnTerm.ino	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/examples/UltrasonicDisplayOnTerm/UltrasonicDisplayOnTerm.ino	(revision 227)
@@ -0,0 +1,63 @@
+/*
+ * UltrasonicDisplayOnTerm.ino
+ * Example sketch for ultrasonic ranger
+ *
+ * Copyright (c) 2012 seeed technology inc.
+ * Website    : www.seeed.cc
+ * Author     : LG, FrankieChu
+ * Create Time: Jan 17,2013
+ * Change Log :
+ *
+ * The MIT License (MIT)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+
+/***************************************************************************/
+//	Function: Measure the distance to obstacles in front and print the distance
+//			  value to the serial terminal.The measured distance is from
+//			  the range 0 to 400cm(157 inches).
+//	Hardware: Grove - Ultrasonic Ranger
+//	Arduino IDE: Arduino-1.0
+/*****************************************************************************/
+
+#include "Ultrasonic.h"
+
+Ultrasonic ultrasonic(7);
+void setup()
+{
+	Serial.begin(9600);
+}
+void loop()
+{
+	long RangeInInches;
+	long RangeInCentimeters;
+	
+	Serial.println("The distance to obstacles in front is: ");
+	RangeInInches = ultrasonic.MeasureInInches();
+	Serial.print(RangeInInches);//0~157 inches
+	Serial.println(" inch");
+	delay(250)
+	
+	RangeInCentimeters = ultrasonic.MeasureInCentimeters(); // two measurements should keep an interval
+	Serial.print(RangeInCentimeters);//0~400cm
+	Serial.println(" cm");
+	delay(250);
+}
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/keywords.txt
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/keywords.txt	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Grove_Ultrasonic_Ranger/keywords.txt	(revision 227)
@@ -0,0 +1,19 @@
+#######################################
+# Syntax Coloring Map For SerialLCD 
+#######################################
+
+#######################################
+# Datatypes (KEYWORD1)
+#######################################
+
+Ultrasonic	KEYWORD1
+
+#######################################
+# Methods and Functions (KEYWORD2)
+#######################################
+MeasureInCentimeters	KEYWORD2
+MeasureInInches	KEYWORD2
+#######################################
+# Constants (LITERAL1)
+#######################################
+
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Makefile
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Makefile	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/Makefile	(revision 227)
@@ -0,0 +1,70 @@
+#
+#  ã¿ã¼ã²ããã®æå®ï¼Makefile.targetã§ä¸æ¸ããããã®ãé²ãããï¼
+#
+all:
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã¡ã¤ã«
+#
+APPL_CXXOBJS += rca_app.o
+APPL_COBJS   += 
+APPL_CFG      = rca_app.cfg
+
+#
+#  Serialã®æ±ã
+#   ARDUINO_SERIAL
+#    NOUSE_SERIAL
+#    USE_SERIAL
+#
+#ARDUINO_SERIAL = NOUSE_SERIAL
+ARDUINO_SERIAL = USE_SERIAL
+
+#
+#  ã©ã¤ãã©ãªã®ä½¿ç¨
+#  
+#USE_ARDUINO_SPI = true
+#USE_ARDUINO_NCESCAN = true
+#USE_ARDUINO_SD  = true
+#USE_ARDUINO_TFT = true
+#USE_ETHERNET2 = true
+#USE_NAXESMOTION = true
+#USE_WIRE = true
+
+#
+#  RCAã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+RCA_DIR = ../..
+
+#
+#  ASPã®ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+SRCDIR = ../../asp_1.9.2
+
+#
+#  ãã®ä»ã®ãªãã·ã§ã³
+#
+APPL_CFLAGS +=
+APPL_LIBS +=
+APPL_DIR     += 
+
+
+APPL_DIR     += $(RCA_DIR)/arduino_lib/libraries/ESP8266_Arudino_AT
+APPL_CXXOBJS += ESP8266.o
+
+APPL_DIR     += $(RCA_DIR)/arduino_lib/libraries/Milkcocoa_Arduino_SDK
+APPL_DIR     += $(RCA_DIR)/arduino_lib/libraries/Milkcocoa_Arduino_SDK/aJson
+APPL_DIR     += $(RCA_DIR)/arduino_lib/libraries/Milkcocoa_Arduino_SDK/include
+APPL_DIR     += $(RCA_DIR)/arduino_lib/libraries/Milkcocoa_Arduino_SDK/include/aJson
+APPL_DIR     += $(RCA_DIR)/arduino_lib/libraries/Milkcocoa_Arduino_SDK/include/Adafruit
+APPL_CXXOBJS += aJSON.o Milkcocoa.o Adafruit_MQTT.o Adafruit_MQTT_Client.o
+APPL_COBJS   += stringbuffer.o 
+
+APPL_DIR     += $(RCA_DIR)/arduino_lib/libraries/Servo/src/ $(RCA_DIR)/arduino_lib/libraries/Servo/src/samd
+APPL_CXXOBJS += Servo.o
+APPL_COBJS   += 
+
+APPL_DIR     += ./Grove_Ultrasonic_Ranger
+APPL_CXXOBJS += Ultrasonic.o
+APPL_COBJS   += 
+
+include $(RCA_DIR)/lib/Makefile.rca
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_clean.bat
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_clean.bat	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_clean.bat	(revision 227)
@@ -0,0 +1,3 @@
+call ../do_path.bat
+make clean
+pause
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_debug.bat
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_debug.bat	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_debug.bat	(revision 227)
@@ -0,0 +1,4 @@
+call ../do_path.bat
+make ocd
+make db
+taskkill /F /IM openocd.exe
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_make.bat
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_make.bat	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_make.bat	(revision 227)
@@ -0,0 +1,3 @@
+call ../do_path.bat
+make all
+pause
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_run.bat
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_run.bat	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/do_run.bat	(revision 227)
@@ -0,0 +1,2 @@
+call ../do_path.bat
+make run
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.atsln
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.atsln	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.atsln	(revision 227)
@@ -0,0 +1,22 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Atmel Studio Solution File, Format Version 11.00
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "rca", "rca.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|ARM = Debug|ARM
+		Release|ARM = Release|ARM
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.ActiveCfg = Debug|ARM
+		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.Build.0 = Debug|ARM
+		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.ActiveCfg = Release|ARM
+		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.Build.0 = Release|ARM
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.componentinfo.xml
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.componentinfo.xml	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.componentinfo.xml	(revision 227)
@@ -0,0 +1,169 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
+	<ProjectComponents>
+		<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
+			<CApiVersion></CApiVersion>
+			<CBundle></CBundle>
+			<CClass>CMSIS</CClass>
+			<CGroup>CORE</CGroup>
+			<CSub></CSub>
+			<CVariant></CVariant>
+			<CVendor>ARM</CVendor>
+			<CVersion>3.40.0</CVersion>
+			<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
+			<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
+				<d4p1:anyType z:Id="i2" i:type="ProjectComponent">
+					<CApiVersion></CApiVersion>
+					<CBundle></CBundle>
+					<CClass>Device</CClass>
+					<CGroup>Startup</CGroup>
+					<CSub></CSub>
+					<CVariant></CVariant>
+					<CVendor>Atmel</CVendor>
+					<CVersion>1.0.0</CVersion>
+					<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
+					<DependentComponents />
+					<Description></Description>
+					<Files>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\include</AbsolutePath>
+							<Attribute></Attribute>
+							<Category>include</Category>
+							<Condition>C</Condition>
+							<FileContentHash i:nil="true" />
+							<FileVersion></FileVersion>
+							<Name>samd21a/include</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\include\sam.h</AbsolutePath>
+							<Attribute></Attribute>
+							<Category>header</Category>
+							<Condition>C</Condition>
+							<FileContentHash>wM94EGprD6Od4xKBsAzkFQ==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/include/sam.h</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\templates\main.c</AbsolutePath>
+							<Attribute>template</Attribute>
+							<Category>source</Category>
+							<Condition>C Exe</Condition>
+							<FileContentHash>dSS7TLoDl1MS+uFZPgKPWQ==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/templates/main.c</Name>
+							<SelectString>Main file (.c)</SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\templates\main.cpp</AbsolutePath>
+							<Attribute>template</Attribute>
+							<Category>source</Category>
+							<Condition>C Exe</Condition>
+							<FileContentHash>nU+WlKcYaWh0AWBBS+WVpA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/templates/main.cpp</Name>
+							<SelectString>Main file (.cpp)</SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\system_samd21.c</AbsolutePath>
+							<Attribute>config</Attribute>
+							<Category>source</Category>
+							<Condition>GCC Exe</Condition>
+							<FileContentHash>Qjqe1jYsYQB+vQG2A3hhiA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/gcc/system_samd21.c</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\startup_samd21.c</AbsolutePath>
+							<Attribute>config</Attribute>
+							<Category>source</Category>
+							<Condition>GCC Exe</Condition>
+							<FileContentHash>pLNlIy+Llw/GLgds0gbQQA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/gcc/gcc/startup_samd21.c</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\samd21g18a_flash.ld</AbsolutePath>
+							<Attribute>config</Attribute>
+							<Category>linkerScript</Category>
+							<Condition>GCC Exe</Condition>
+							<FileContentHash>4xbqLG5DtSn/T8pJoWAvNA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/gcc/gcc/samd21g18a_flash.ld</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\samd21g18a_sram.ld</AbsolutePath>
+							<Attribute>config</Attribute>
+							<Category>other</Category>
+							<Condition>GCC Exe</Condition>
+							<FileContentHash>K9GWjx6oZkcBnxrHUbvSwA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/gcc/gcc/samd21g18a_sram.ld</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+					</Files>
+					<PackName>SAMD21_DFP</PackName>
+					<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/SAMD21_DFP/1.0.222/Atmel.SAMD21_DFP.pdsc</PackPath>
+					<PackVersion>1.0.222</PackVersion>
+					<PresentInProject>true</PresentInProject>
+					<ReferenceConditionId>ATSAMD21G18A</ReferenceConditionId>
+					<RteComponents>
+						<d4p1:string></d4p1:string>
+					</RteComponents>
+					<Status>Resolved</Status>
+					<VersionMode>Fixed</VersionMode>
+					<IsComponentInAtProject>true</IsComponentInAtProject>
+				</d4p1:anyType>
+			</DependentComponents>
+			<Description></Description>
+			<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
+				<d4p1:anyType i:type="FileInfo">
+					<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\4.2.0\CMSIS\Documentation\Core\html\index.html</AbsolutePath>
+					<Attribute></Attribute>
+					<Category>doc</Category>
+					<Condition></Condition>
+					<FileContentHash>Fm1Ae7doPh4708FZQAIEpw==</FileContentHash>
+					<FileVersion></FileVersion>
+					<Name>CMSIS\Documentation\Core\html\index.html</Name>
+					<SelectString></SelectString>
+					<SourcePath></SourcePath>
+				</d4p1:anyType>
+				<d4p1:anyType i:type="FileInfo">
+					<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\4.2.0\CMSIS\Include\</AbsolutePath>
+					<Attribute></Attribute>
+					<Category>include</Category>
+					<Condition></Condition>
+					<FileContentHash i:nil="true" />
+					<FileVersion></FileVersion>
+					<Name>CMSIS\Include\</Name>
+					<SelectString></SelectString>
+					<SourcePath></SourcePath>
+				</d4p1:anyType>
+			</Files>
+			<PackName>CMSIS</PackName>
+			<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/arm/cmsis/4.2.0/ARM.CMSIS.pdsc</PackPath>
+			<PackVersion>4.2.0</PackVersion>
+			<PresentInProject>true</PresentInProject>
+			<ReferenceConditionId>CMSIS Core</ReferenceConditionId>
+			<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
+				<d4p1:string></d4p1:string>
+			</RteComponents>
+			<Status>Resolved</Status>
+			<VersionMode>Fixed</VersionMode>
+			<IsComponentInAtProject>true</IsComponentInAtProject>
+		</ProjectComponent>
+		<ProjectComponent z:Ref="i2" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
+	</ProjectComponents>
+</Store>
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.cproj
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.cproj	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca.cproj	(revision 227)
@@ -0,0 +1,168 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
+  <PropertyGroup>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectVersion>7.0</ProjectVersion>
+    <ToolchainName>com.Atmel.ARMGCC.C</ToolchainName>
+    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>
+    <avrdevice>ATSAMD21G18A</avrdevice>
+    <avrdeviceseries>none</avrdeviceseries>
+    <OutputType>Executable</OutputType>
+    <Language>C</Language>
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
+    <OutputFileExtension>.elf</OutputFileExtension>
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
+    <AssemblyName>rca</AssemblyName>
+    <Name>rca</Name>
+    <RootNamespace>rca</RootNamespace>
+    <ToolchainFlavour>Native</ToolchainFlavour>
+    <KeepTimersRunning>true</KeepTimersRunning>
+    <OverrideVtor>false</OverrideVtor>
+    <CacheFlash>true</CacheFlash>
+    <ProgFlashFromRam>true</ProgFlashFromRam>
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>
+    <UncachedRange />
+    <preserveEEPROM>true</preserveEEPROM>
+    <OverrideVtorValue>exception_table</OverrideVtorValue>
+    <BootSegment>2</BootSegment>
+    <eraseonlaunchrule>4</eraseonlaunchrule>
+    <ExternalProgrammingToolCommand />
+    <AsfFrameworkConfig>
+      <framework-data xmlns="">
+        <options />
+        <configurations />
+        <files />
+        <documentation help="" />
+        <offline-documentation help="" />
+        <dependencies>
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />
+        </dependencies>
+      </framework-data>
+    </AsfFrameworkConfig>
+    <UseGdb>False</UseGdb>
+    <avrtool>com.atmel.avrdbg.tool.edbg</avrtool>
+    <avrtoolserialnumber>FFFFFFFFFFFFFFFFFFFF</avrtoolserialnumber>
+    <avrdeviceexpectedsignature>0x10010005</avrdeviceexpectedsignature>
+    <avrtoolinterface>SWD</avrtoolinterface>
+    <com_atmel_avrdbg_tool_edbg>
+      <ToolOptions>
+        <InterfaceProperties>
+          <SwdClock>2000000</SwdClock>
+        </InterfaceProperties>
+        <InterfaceName>SWD</InterfaceName>
+      </ToolOptions>
+      <ToolType>com.atmel.avrdbg.tool.edbg</ToolType>
+      <ToolNumber>FFFFFFFFFFFFFFFFFFFF</ToolNumber>
+      <ToolName>EDBG</ToolName>
+    </com_atmel_avrdbg_tool_edbg>
+    <avrtoolinterfaceclock>2000000</avrtoolinterfaceclock>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+    <ToolchainSettings>
+      <ArmGcc>
+  <armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
+  <armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
+  <armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
+  <armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
+  <armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
+  <armgcc.compiler.symbols.DefSymbols>
+    <ListValues>
+      <Value>NDEBUG</Value>
+    </ListValues>
+  </armgcc.compiler.symbols.DefSymbols>
+  <armgcc.compiler.directories.IncludePaths>
+    <ListValues>
+      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
+      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
+    </ListValues>
+  </armgcc.compiler.directories.IncludePaths>
+  <armgcc.compiler.optimization.level>Optimize for size (-Os)</armgcc.compiler.optimization.level>
+  <armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
+  <armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
+  <armgcc.linker.libraries.Libraries>
+    <ListValues>
+      <Value>libm</Value>
+    </ListValues>
+  </armgcc.linker.libraries.Libraries>
+  <armgcc.linker.libraries.LibrarySearchPaths>
+    <ListValues>
+      <Value>%24(ProjectDir)\Device_Startup</Value>
+    </ListValues>
+  </armgcc.linker.libraries.LibrarySearchPaths>
+  <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>
+  <armgcc.linker.miscellaneous.LinkerFlags>-Tsamd21g18a_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>
+  <armgcc.preprocessingassembler.general.IncludePaths>
+    <ListValues>
+      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
+      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
+    </ListValues>
+  </armgcc.preprocessingassembler.general.IncludePaths>
+</ArmGcc>
+    </ToolchainSettings>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+    <ToolchainSettings>
+      <ArmGcc>
+  <armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
+  <armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
+  <armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
+  <armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
+  <armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
+  <armgcc.compiler.symbols.DefSymbols>
+    <ListValues>
+      <Value>DEBUG</Value>
+    </ListValues>
+  </armgcc.compiler.symbols.DefSymbols>
+  <armgcc.compiler.directories.IncludePaths>
+    <ListValues>
+      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
+      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
+    </ListValues>
+  </armgcc.compiler.directories.IncludePaths>
+  <armgcc.compiler.optimization.level>Optimize (-O1)</armgcc.compiler.optimization.level>
+  <armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
+  <armgcc.compiler.optimization.DebugLevel>Maximum (-g3)</armgcc.compiler.optimization.DebugLevel>
+  <armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
+  <armgcc.linker.libraries.Libraries>
+    <ListValues>
+      <Value>libm</Value>
+    </ListValues>
+  </armgcc.linker.libraries.Libraries>
+  <armgcc.linker.libraries.LibrarySearchPaths>
+    <ListValues>
+      <Value>%24(ProjectDir)\Device_Startup</Value>
+    </ListValues>
+  </armgcc.linker.libraries.LibrarySearchPaths>
+  <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>
+  <armgcc.linker.miscellaneous.LinkerFlags>-Tsamd21g18a_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>
+  <armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>
+  <armgcc.preprocessingassembler.general.IncludePaths>
+    <ListValues>
+      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
+      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
+    </ListValues>
+  </armgcc.preprocessingassembler.general.IncludePaths>
+  <armgcc.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcc.preprocessingassembler.debugging.DebugLevel>
+</ArmGcc>
+    </ToolchainSettings>
+    <UsesExternalMakeFile>True</UsesExternalMakeFile>
+    <OutputDirectory />
+    <BuildTarget>all</BuildTarget>
+    <CleanTarget>clean</CleanTarget>
+    <ExternalMakeFilePath>Makefile</ExternalMakeFilePath>
+  </PropertyGroup>
+  <ItemGroup>
+    <None Include="rca_app.cfg">
+      <SubType>compile</SubType>
+    </None>
+    <None Include="rca_app.cpp">
+      <SubType>compile</SubType>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="rca_app.h">
+      <SubType>compile</SubType>
+    </Compile>
+  </ItemGroup>
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
+</Project>
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.cfg
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.cfg	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.cfg	(revision 227)
@@ -0,0 +1,6 @@
+/*
+ *  $Id: sample1.cfg 2416 2012-09-07 08:06:20Z ertl-hiro $
+ */
+
+INCLUDE("rca_lib.cfg");
+
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.cpp
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.cpp	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.cpp	(revision 227)
@@ -0,0 +1,173 @@
+#include "rca.h"
+#include "ESP8266.h"
+#include "Milkcocoa.h"
+#include "Client_ESP8266.h"
+
+#define STA_SSID       ""
+#define STA_PASSWORD   ""
+
+#define MILKCOCOA_APP_ID      ""
+#define MILKCOCOA_DATASTORE   ""
+
+#define MILKCOCOA_SERVERPORT  1883
+
+ESP8266Client wifi_client;
+
+const char MQTT_SERVER[] PROGMEM    = MILKCOCOA_APP_ID ".mlkcca.com";
+const char MQTT_CLIENTID[] PROGMEM  = __TIME__ MILKCOCOA_APP_ID;
+
+Milkcocoa milkcocoa = Milkcocoa(&wifi_client, MQTT_SERVER, MILKCOCOA_SERVERPORT, MILKCOCOA_APP_ID, MQTT_CLIENTID);
+
+#include <Servo.h> 
+Servo myservo; 
+
+#include "Ultrasonic.h"
+Ultrasonic ultrasonic(3);
+
+extern void onpush(DataElement *elem);
+
+bool setup_done = false;
+
+void setup()
+{
+    int ret;
+    
+    Serial.begin(115200);
+    Serial.print("Milkcocoa NCES IoT demo");
+
+    // Connect to WiFi access point.
+    Serial.println(); Serial.println();
+    Serial.print("Connecting to ");
+    Serial.println(STA_SSID);
+
+    ret = WiFi.begin(Serial5, 115200);
+
+    if(ret == 1) {
+        Serial.print("Cannot communicate with ESP8266.");
+        while(1);        
+    } else if(ret == 2) {
+        Serial.println("FW Version mismatch.");
+        Serial.print("FW Version:");
+        Serial.println(WiFi.getVersion().c_str());
+        Serial.print("Supported FW Version:");
+        Serial.println(ESP8266_SUPPORT_VERSION);
+        while(1);
+    } else {
+        Serial.print("begin ok\r\n");
+    }
+
+    Serial.print("FW Version:");
+    Serial.println(WiFi.getVersion().c_str());
+    
+    if (WiFi.setOprToStation()) {
+        Serial.print("to station ok\r\n");
+    } else {
+        Serial.print("to station err\r\n");
+    }
+    
+    if (WiFi.joinAP(STA_SSID, STA_PASSWORD)) {
+        Serial.print("Join AP success\r\n");
+        Serial.print("IP: ");
+        Serial.println(WiFi.getLocalIP().c_str());    
+    } else {
+        Serial.print("Join AP failure\r\n");
+    }
+
+    if (WiFi.stopServer()) {
+        Serial.print("Stop server ok\r\n");
+    } else {
+        Serial.print("Stop server err\r\n");
+    }        
+    
+    if (WiFi.disableMUX()) {
+        Serial.print("single ok\r\n");
+    } else {
+        Serial.print("single err\r\n");
+    }
+    
+    if (milkcocoa.on(MILKCOCOA_DATASTORE, "push", onpush)){
+        Serial.println("milkcocoa on sucesss");   
+    }
+    else {
+        Serial.println("milkcocoa on failure");   
+    }
+
+    myservo.attach(2);
+    
+    setup_done = true;
+    Serial.println("setup end\r\n");
+}
+
+void loop() {
+    int8_t ret;
+    int8_t push_ret;
+    
+    long RangeInCentimeters;
+    RangeInCentimeters = ultrasonic.MeasureInCentimeters();
+    Serial.print(RangeInCentimeters);//0~400cm
+    Serial.println(" cm");
+    
+    DataElement elem = DataElement();
+    elem.setValue("RangeInCentimeters", (int)RangeInCentimeters);
+    
+    do {
+        push_ret = milkcocoa.push(MILKCOCOA_DATASTORE, &elem);
+        if (push_ret != 0) {
+            Serial.println("Milkcocoa.push() error.");
+            Serial.println(milkcocoa.pushErrorString(push_ret));
+            Serial.println(push_ret);
+            Serial.println("Retrying MQTT push in 5 seconds...");
+            delay(5000);
+        }        
+    }while(push_ret != 0);
+    
+    Serial.println("Push success.");
+    delay(2000);
+    
+    if (Serial.available() > 0) {
+        Serial.read();
+        Serial.print("Pause  : Input any char to continue.\n\r");
+        while(!(Serial.available() > 0));
+        Serial.print("Resume.\n\r");
+        Serial.read();
+    }    
+}
+
+void onpush(DataElement *pelem) {
+    char *data;
+    int  pos;
+    if(!pelem->getString("SERVO", &data)) {
+        return;
+    };
+    
+    pos = atoi(data);
+
+    if ((pos >=  0) && (pos <= 180))  {
+        myservo.write(pos);
+        Serial.print("Ser Servo : ");
+        Serial.println(pos);
+    }
+}
+
+
+/*
+ *  For TASK1
+ */
+void task1_setup() {
+    while(!setup_done) {
+        delay(1);
+    }
+    Serial.println("Servo Task : start");
+}
+
+void task1_loop() {
+    int8_t ret;
+    while((ret = milkcocoa.loop(1)) != 0) {
+        Serial.println("Milkcocoa.loop() connection error.");
+        Serial.println(milkcocoa.connectErrorString(ret));
+        Serial.println(ret);
+        Serial.println("Retrying MQTT connection in 5 seconds...");
+        delay(5000);
+    }
+    delay(100);
+}
Index: /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.h
===================================================================
--- /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.h	(revision 227)
+++ /rtos_arduino/trunk/examples/Milkcocoa_NCESIoT/rca_app.h	(revision 227)
@@ -0,0 +1,6 @@
+#ifndef _RCA_APP_H_
+#define _RCA_APP_H_
+
+#define RCA_NUM_TASK 1
+
+#endif /* _RCA_APP_H_ */
