Skip to content

nCube:Thyme for Arduino Application : nCube Air (English)

IoTKETI edited this page Jan 8, 2019 · 1 revision

nCube:Thyme for Arduino - Application : nCube-Air

Development Environment Setup

IDE installation & nCube:Thyme for Arduino Libraries Download

Json & MQTT Libraries for Arduino Download

At first, download ArduinoJson and PubSubClient libraries via github page linked below

Next, move these libraries to your arduino project libraries directory where is nCube:Thyme for Arduino libraries placed, like picture below.

Open PubSubClient.h under pubsubclient/src, edit MQTT_MAX_PACKET_SIZE variable's value to 400.

Hardware

List of Materials

  • One Adafruit Feather M0 WiFi with uFL
  • One 2.4GH Mini Flexible WiFi Antenna with uFL Connector
  • One Adafruit CCS811 Air Quality Sensor
  • One RGB 3Color LED
  • One Bread Board
  • A set of Jumper Cable M/M
  • One USB Type-A to Micro-B Cable
  • One 5V 2A USB Micro-B Power Adaptor

  • Cortex M0 processor
  • Support SPI, I2C, UART communications
  • Atmel WINC1500 WiFi chip that supports 802.11bgn

  • Measures the Co2, TVOC(TOTAL Volatile Organic Compounds), Temperature values from the air
  • Upload values to Arduino using the I2C communication

RGB LED

  • RGB 3-color LED board operates red, green and blue LEDs
  • It's depending on the input of R, G, B pins

nCube-Air Application Development

Hardware Connection

Adafruit Feather M0 and Sensors wired like picture below.

nCube-Air Arudino sketch

Copy nCube-Air.ino Arduino sketch example code under lib/oneM2MClient/examples/nCube-Air to src directory,
like picture below.

nCube-Air Arduino sketch upload & execution


Connect Adafruit Feather M0 to PC using usb cable.


To compile and upload, click upload button on PlatformIO tool bar.


To check whether nCube-Air application running or not, open serial monitor.
click serial monitor button on PlatformIO tool bar.


Connect to 'wifi101-XXXX' (different name for each Adafruit Feather M0 board) displayed on the serial monitor using the WiFi of smartphone of laptop.


And then, open web browser to connect 'http://wifi101.local'.
Enter the SSID of the AP to be connected under the Network Name, the Password corresponding to the AP below the Passphrase, and connect to the WiFi by clicking the Connect button.


Now nCube-Air create resources and upload sensing value. These sequences are displayed in serial monitor.

nCube-Air Data Query & Control

nCube-Air Sensing Values Query

To query sensing values, open Mobius Resource Monitor.


Type AE_NAME variable's value in Resource Path like picture above.
And click start button.


You can see the resource structure of the nCube-Air application.


In each cnt, tvoc, temp, co2, sensing values uploaded.

nCube-Air RGB-LED Control

To control RGB-LED, create cin on led cnt.


Move your mouse on led cnt, and click right button, create.


Input number from 0 to 7 in Content(con), and click create button.


Each Red, Green, Blue LED will turn on according to con value.

Clone this wiki locally