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
Arduino Library Manager
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 Client library from Library Manager

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.
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.
Open Thinger.io example for an Arduino Compatible Device
A basic example for an ESP32 device will look like the following:
ESP32.ino
arduino_secrets.h
1
#define THINGER_SERIAL_DEBUG
2
3
#include <ThingerESP32.h>
4
#include "arduino_secrets.h"
5
6
ThingerESP32 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
7
8
void setup() {
9
// open serial for debugging
10
Serial.begin(115200);
11
12
pinMode(16, OUTPUT);
13
14
thing.add_wifi(SSID, SSID_PASSWORD);
15
16
// digital pin control example (i.e. turning on/off a light, a relay, configuring a parameter, etc)
17
thing["GPIO_16"] << digitalPin(16);
18
19
// resource output example (i.e. reading a sensor value)
20
thing["millis"] >> outputValue(millis());
21
22
// more details at http://docs.thinger.io/arduino/
23
}
24
25
void loop() {
26
thing.handle();
27
}
Copied!
1
#define USERNAME "your_user_name"
2
#define DEVICE_ID "your_device_id"
3
#define DEVICE_CREDENTIAL "your_device_credential"
4
5
#define SSID "your_wifi_ssid"
6
#define SSID_PASSWORD "your_wifi_ssid_password"
Copied!
Last modified 2mo ago