Arduino IDE

Arduino is currently the best framework for learning, prototyping and even developing products, thanks to its simplicity and the large community of developers that is contributing daily to increase its capabilities. That is why at Thinger.io we have developed a Software Client to easily connect Arduino based devices, compatible with a wide variety of hardware. It is available for Windows, Macintosh and Linux distributions, and can be downloaded for free from their official website.

The following sections explains how to install and prepare Arduino IDE to work with Thinger.io client libraries.

Install Arduino IDE

It is required a modern version of Arduino supporting Library Manager and some other features. Please install a version starting from 1.6.3 from the official Arduino download page. This step is not required if you already have a modern version.

Download Arduino IDE from their official website.

Install Thinger.io from Library Manager

Thinger.io Client libraries contains the software for connecting Arduino compatible devices with Thinger.io platform. It is the preferred way for connecting devices to the platform, as it allow to extract all the Thinger.io features.

The library can be obtained from the Arduino Library Manager, which simplifies searching and installing new libraries and also supports updating libraries when new versions are released, so actually it is preferable using this method:

Open the Library Manager in the Arduino menu in Sketch > Include Library > Manage Libraries

Search the library with name thinger.io and then click Install. You can update the library also from this manager when it is updated.

Install Thinger.io from ZIP

If the preferred way using the Library Manager is not working or you prefer to manage the libraries yourself, you can obtain the .zip library file from the official Thinger.io project Github repository by clicking in the link below. This will download a file called Arduino-Library-master.zip.

Download Library

Now rename the Arduino-Library-master.zip file to something more relevant like thinger.zip.

The final step is to import the zip library using the Arduino IDE. This step will uncompress and copy the zip library in the Arduino libraries folder. Which is usually under your Documents folder.

Sketch > Include Library > Add .ZIP libraries, and select the thinger.zip file created in the previous step.

Starting a Project

Once Thinger.io Library has been installed, it is possible to start a new project by using some of the default examples provided. There are examples for different boards, so, choose the one that matches your device.

Open File > Examples > thinger.io and start with an example for your device.

A basic example for an ESP32 device will look like the following:

#define THINGER_SERIAL_DEBUG

#include <ThingerESP32.h>
#include "arduino_secrets.h"

ThingerESP32 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);

void setup() {
  // open serial for debugging
  Serial.begin(115200);

  pinMode(16, OUTPUT);

  thing.add_wifi(SSID, SSID_PASSWORD);

  // digital pin control example (i.e. turning on/off a light, a relay, configuring a parameter, etc)
  thing["GPIO_16"] << digitalPin(16);

  // resource output example (i.e. reading a sensor value)
  thing["millis"] >> outputValue(millis());

  // more details at http://docs.thinger.io/arduino/
}

void loop() {
  thing.handle();
}

Last updated