Skip to content

IoTKETI/nCube-Thyme-Arduino

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

nCube:Thyme for Arduino

Version

2.1.6 (20180514)

Introduction

nCube:Thyme for Arduino is a light version nCube for arduino devices.
Also nCube:Thyme for Arduino is one of AE(Application Entity) based on oneM2M IoT standard. nCube:Thyme for Arduino provides example code "nCube-Air" as example of OneM2MClient library.

Hardware


Connectivity

The example code introduces how to use Adafruit Feather M0 WiFi Board to Adafruit CCS811 Air Quality Sensor, RGB LED light connect to Mobius server platform.

Installation

  • Download Arduino IDE.
  • Install Arduino IDE.
  • Download nCube-Thyme-Arduino.
  • Copy the libraries file to Arduino IDE libraries folder.
    We provide nCube-Mint source as Arduino libraries and you need to copy or overwrite it to the Arduino IDE library home "c:\Users[user name]\Document\Arduino\libraries".

Configuration

Adafruit Feather M0 is not an Arduino official device. Therefore, some configurations for the Arduino IDE to work well with Adafruit Feather M0 device were made. Configuration details are available at Adafruit Feather M0 offical site or nCube-mint guide document.

Running

  • Connect the debug cable to PC
    image
  • Open "File>Examples>oneM2MClient>nCube-Mint"
  • Open "Tools>Serial Monitor" for view the log.

  • Modifications of the source can be made if needed.
  • Click "upload" button at top of the Arduino IDE.
  • Connect PC WiFi to SSID "wifi101-3B3E".
  • Open the link "http://wifi101.local".
  • Input WiFi connection information on the page and click connection button.


Over The Air(OTA)

OTA (Over The Air) means programmers can code on local and send it to the device to upgrade or replace with new firmware through the cloud. In Arduino, some developer finds a new way to update the Arduino sketch online. It enables developers to install wireless Arduino devices in a place where there is a difficulty of accessibility can be updated without uninstallation.

image

nCube-Mint-OTA

&Cube-Mint is a software for the light weight WiFi devices(e.g. Arduino Yun or Arduino UNO) with WiFi shield and direct internet access without gateway. It is a light weight C++ program that make connections between Adafruit Feather M0 WiFi board and Mobius IoT Server Platform (see more in IoT-OCEAN official website). As mentioned above, we also provide a software named &Cube-Mint OTA to support a remote software upgrade with the internet connection in a situation where there is a difficulty of accessibility.

OTA(Over The Air) stands for the remote software upgrade that can code local and send it to the device to upgrade or replace with new firmware through the cloud. In Arduino, some developer finds a new way to update the Arduino sketch online. It enables developers to install wireless Arduino devices in a place where there is a difficulty of accessibility.

image

Example

  1. First firmware
  • Open "File>Examples>oneM2MClient>nCube-Mint-OTA".
  • Check “FIRMWARE_VERSION”, "AE_ID" and "buildResource()".
  • Upload sketch to the board.
  1. Update firmware
  • Check “FIRMWARE_VERSION”, "AE_ID"(raise the version number).
  • Compile new ".Hex" file.
C:\Users\[user]\AppData\Local\Temp\arduino_build_********
POST /Mobius/[your-ae]/update
Host: 203.253.128.161:7579
Accept: application/json
X-M2M-RI: 12345
X-M2M-Origin: [your-ae]
Content-Type: application/vnd.onem2m-res+json; ty=4

{"m2m:cin":{"con":"active"}}

OTA Result

1

Dependency Libraries

  • ArduinoJson
  • FlashStorage
  • PubSubClient
  • WiFi101
  • WiFi101OTA
  • TasCO2: CM1106 CO2 Sensor library(Made by KETI)
  • OneM2MClient: Mobius client library(Made by KETI)
  • OverTheAir: Device Online upgrade module(Made by KETI)

Document

For more information, please refer to the installation guide document as below.

Author

Il Yeup Ahn ([email protected]; [email protected])