Arduino User Guide


Thing+ Guide for Arduino(Arduino with Non-SSL)

  1. Install Arduino IDE
  2. Environment Setting
  3. Arduino Firmware install
  4. Gateway Registration
  5. Firmware build and upload



This document is only for the purposes of the education and personal test. Arduino and/or H/W having similar specs with Arduino can’t support the SSL Encryption because they don’t have enough CPU Power for it. Because of that, An extra H/W which support the SSL Encryption is required to use Arduino with ThingPlus Cloud. For Arduino Users’ convenience, we’d like to introduce the new way to use Arduino Board as the ThingPlus IoT Gateway without any extra H/W. All of the communications between your Arduino board and ThingPlus Cloud can be disclosed because they are not encrypted.
WE STRONGLY RECOMMEND TO USE THIS ONLY FOR THE EDUCATION AND PERSONAL TESTS WHICH DOESN’T INCLUDE ANY KINDS OF SENSITIVE DATA.
API KEY for the non encrypted communication between Arduino and ThingPlus Cloud will be valid only for 30 days. If you want to use the API KEY over 30 days, please extend the valid duration before it is expired


Compatible Board for Thingplus Arduino Library

  • Arduino Board / Orange Board
  • ESP8266 (without Aruino board)
  • Aruino WizFi250
  • Board using ARM CORETEX-M chip


1. Install Arduino IDE

1) Install Arduino IDE upon PC OS environment. Please use above version. 1.6.9.


2. Environment Setting

1) Connect Arduino and PC.

  • Connect sensors as the following. Arduino Select Port

  • Check mac address at bottom of Ethernet Shield Arduino Mac Address

  • Connect Arduino Uno(Orange Board) with grove shield and then Connect Ethernet Shield on there. Arduino Select Port

  • Connect Lan cable on Ethernet Port, Connect USB port and PC. Arduino Select Port


2) Execute Arduino IDE.


3) Select USB for Arduino Port in IDE. (for windows, COMxx)

  • Tools -> Port -> Arduino/Genuino Uno

    Arduino Select Port


3. Arduino Firmware install

1) Select Firmware to download into Arduino.

  • Have to install Firmware is as the following.
    • Arduino Library
    • ArduinoJson
    • PubSubClient
    • Time
    • Timer
  • thingplus Library (above. v1.0.7)
    • Scketch -> Include Library -> Manage Libraries...

      - Search > thingplus > install

      Arduino_json Arduino Lib

  • ArduinoJson
    • Scketch -> Include Library -> Manage Libraries...

      - Search > ArduinoJson > install

      Arduino_json Search Arduino_json

  • PubSubClient
    • Scketch -> Include Library -> Manage Libraries...

      - Search > PubSubClient > install

      Arduino_json Search Arduino_Pubsub

  • Time
    • Scketch -> Include Library -> Manage Libraries...

      - Search > timekeep > install

      Arduino_json Search Arduino_Time

  • Timer


2) Modify header file in PubSubClient

  • Arduino Library Directory Path

    Windows : My Documents\Arduino\libraries\
    Mac : ~/Documents/Arduino/libraries/
    Linux : /home/<your user name>/sketchbook/libraries
    
  • open LibrayPath/PubSubClient/src/PubSubClient.h and modify as the following.

    • MQTT_MAX_PACKET_SIZE 196
    • MQTT_KEEPALIVE 120

    Arduino_Edit_Pubsub

Notice : If you didn’t modify this part, actuator will be not works.


4. Gateway Registration

1) Get API key and register sensors

  • There are 3 examples in LibrayPath/Thingplus/examples/ (above thingplus library v1.0.7)
    • ArduinoEthernet : For Aruino + ethernet shield
    • ArduinoWizFi250 : For Arduino + WizFi250(wifi module of Wiznet)
    • ESP8266 : For ESP8266 (without Arduino board)
  • This guide is guide of Arduino+Ethernet, so we use LibrayPath/Thingplus/examples/ArduinoEthernet/ArduinoEthernet.ino.
  • If you want to add another sensors or another actions, then modify/add the scripts.


  • Get API KEY in thingplus portal using mac address. (you might checked mac address on Ethernet Shield)
    • Assumed mac address is 11-FF-1F-F9-03-DF

    • https://iot.thingplus.net/ > sign in > Settings > Gateway Management Arduino Register

    • Select Arduino-Developer as Gateway Model. Arduino GW Model

    • Input mac address in Gateway ID field.

    • Select a Get API key button. Arduino Get APIKEY

    • API Key is issued. (The API key wil be expired in 30 days) ** copy ‘API KEY’** Arduino APIKEY

    • Select a Register Gateway button.

    • Input Gateway name.

    • Select grove startkit for Arduino as the device model.

    • Input a Device name. Arduino  Register

    • Select a Register a Gateway, Device and Sensors button. Arduino  Register Finish

    • Move to Gateway Management in thingplus portal

    • You can see the sensor ID. Arduino  Sensor ID

  • Update ReadTemperatureWriteLed.ino file.
    • Update mac address : update each 2 digit of mac with 0x . Arduino mac address input

    • Update api key : update using Copied API KEY. Arduino APIKEY Register

    • Update sensor ID (input mac address in place of 00000000000) Arduino Setting

Notice : The Gateway ID and API KEY is just for help to understand. Above ID and KEY is not available.


5. Firmware build and upload(execute)

1) build(compile) firmware.

Arduino Verify


2) Upload Firmware on Arduino.

Arduino Download


3) Check if the below message shown at IDE.

Arduino Download Success

4) Reay to use

  • now, you can use arduino Independently.