Skip to content

Devices

Supported boards

The boards and network modules the Thinger.io Arduino library supports, with the class, the example sketch and the OTA support of each.

Reference4 min read

The Thinger.io Arduino library (thinger.io in the library managers) supports these boards and network modules. Include the header of your board and create the thing object with its class; the rest of the sketch is the same for every board (see the Coding guide). Each board has a complete sketch on its family page, and the same sketch in File > Examples > thinger.io of the Arduino IDE.

Boards and classes ​

The Example column is the name of the sketch in File > Examples > thinger.io.

Espressif ​

BoardNetworkIncludeClassExampleOTA
ESP32, ESP32-S2, S3, C3, C5, C6Wi-FiThingerESP32.hThingerESP32ESP32, ESP32OTA, ESP32RTOSYes, ThingerESP32OTA
ESP32, ESP32-P4EthernetThingerESP32Eth.hThingerESP32EthESP32EthYes, ThingerESP32OTA
ESP32Wi-Fi set up from a phoneThingerESP32WebConfig.hThingerESP32WebConfigESP32WebConfig—
ESP8266Wi-FiThingerESP8266.hThingerESP8266ESP8266, ESP8266OTAYes, ThingerESP8266OTA
ESP8266Wi-Fi set up from a phoneThingerESP8266WebConfig.hThingerESP8266WebConfigESP8266WebConfig—
ESP8266Wi-Fi set up with ESP-TouchThingerSmartConfig.hThingerSmartConfigESP8266SmartConfig—
Arduino with an ESP8266 as Wi-Fi modem (AT commands)Wi-FiThingerESP8266AT.hThingerESP8266ATESP8266AT—

Arduino ​

BoardNetworkIncludeClassExampleOTA
Arduino Nano RP2040 ConnectWi-FiThingerMbed.hThingerMbedArduinoNanoRP2040Yes, ThingerMbedOTA
Arduino Nano 33 IoTWi-FiThingerWiFiNINA.hThingerWiFiNINAArduinoNano33IOTYes, ThingerWiFiNINAOTA
Arduino MKR WiFi 1010Wi-FiThingerWiFiNINA.hThingerWiFiNINAArduinoMKR1010Yes, ThingerWiFiNINAOTA
Arduino UNO WiFi Rev2Wi-FiThingerWiFiNINA.hThingerWiFiNINA——
Arduino Portenta H7, GIGA R1 WiFi (Zephyr core)Wi-FiThingerZephyr.hThingerZephyrArduinoZephyr—
Arduino Opta WiFi (Zephyr core)Wi-FiThingerZephyr.hThingerZephyrArduinoOptaZephyr—
Arduino Portenta H7 (Mbed OS core)Wi-FiThingerMbed.hThingerMbedArduinoPortentaH7Yes, ThingerPortentaOTA
Arduino Portenta H7 (Mbed OS core)EthernetThingerMbedEth.hThingerMbedEthArduinoPortentaH7EthernetYes, ThingerPortentaOTA
Arduino Opta (Mbed OS core)Wi-FiThingerMbed.hThingerMbedArduinoOptaWiFiYes, ThingerPortentaOTA
Arduino Opta (Mbed OS core)EthernetThingerMbedEth.hThingerMbedEthArduinoOptaEthernetYes, ThingerPortentaOTA
Arduino MKR NB 1500NB-IoT / LTE-MThingerMKRNB.hThingerMKRNBArduinoMKRNB1500Yes, ThingerMKRNBOTA
Arduino MKR GSM 1400GSM / GPRSThingerMKRGSM.hThingerMKRGSMArduinoGSM1400—
Arduino MKR1000Wi-FiThingerWifi101.hThingerWifi101ArduinoMKR1000—
Arduino UNO R4 WiFiWi-FiThingerR4WiFi.hThingerR4WiFiArduinoR4WifiYes, ThingerR4OTA
Arduino UNO QWi-Fi, through its Linux sideThingerUnoQ.hThingerUnoQArduinoUnoQ—
Arduino YúnWi-Fi or EthernetThingerYun.hThingerYunArduinoYun—
Arduino with Ethernet shieldEthernetThingerEthernet.hThingerEthernetArduinoEthernet—
Arduino with ENC28J60 moduleEthernetThingerENC28J60.hThingerENC28J60ArduinoENC28J60—
Arduino with WiFi shieldWi-FiThingerWifi.hThingerWifiArduinoWifi—
Arduino with Adafruit CC3000Wi-FiThingerCC3000.hThingerCC3000ArduinoCC3000—
Arduino with a GSM modem (SIM800, SIM900, A6, A7, M590)GPRSThingerTinyGSM.hThingerTinyGSMArduinoTinyGSM—

Other boards ​

BoardNetworkIncludeClassExampleOTA
Raspberry Pi Pico W and Pico 2 WWi-FiThingerPicoW.hThingerPicoWPicoWYes, ThingerPicoOTA
Thinger.io NB-IoT CoreNB-IoTThingerNBCore.hThingerNBCoreNBCoreYes, ThingerESP32OTA
Texas Instruments CC3200 (Energia IDE)Wi-FiThingerWifi.hThingerWifiEnergiaCC3200—
SeeedStudio LinkIt ONEWi-FiThingerLinkItOneWifi.hThingerLinkItOneWifiLinkItOneWifi—
SeeedStudio LinkIt ONEGPRSThingerLinkItOneGPRS.hThingerLinkItOneGPRSLinkItOneGPRS—

A board with OTA support can receive firmware updates over the Internet from the Visual Studio Code extension. Add the OTA include and create the OTA object after thing:

cpp
#include <ThingerESP32.h>
#include <ThingerESP32OTA.h>

ThingerESP32 thing("YOUR_USER", "YOUR_DEVICE", "YOUR_TOKEN");
ThingerESP32OTA ota(thing);

Credentials file ​

The example sketches keep the credentials out of the code, in a file called arduino_secrets.h in the sketch folder (the Arduino IDE shows it as a second tab). The sketch includes it with #include "arduino_secrets.h". Replace the placeholders with your username, the device ID and the device credentials, and add the settings of your network:

cpp
#define USERNAME "YOUR_USER"
#define DEVICE_ID "YOUR_DEVICE"
#define DEVICE_CREDENTIAL "YOUR_TOKEN"

#define SSID "wifi-network"
#define SSID_PASSWORD "wifi-password"
cpp
#define USERNAME "YOUR_USER"
#define DEVICE_ID "YOUR_DEVICE"
#define DEVICE_CREDENTIAL "YOUR_TOKEN"

#define PIN_NUMBER "1234"

#define GPRS_APN "internet.example"
#define GPRS_LOGIN ""
#define GPRS_PASSWORD ""
cpp
#define USERNAME "YOUR_USER"
#define DEVICE_ID "YOUR_DEVICE"
#define DEVICE_CREDENTIAL "YOUR_TOKEN"
  • DEVICE_CREDENTIAL holds the device credentials, not an access token.
  • Keep arduino_secrets.h out of version control if you share the sketch.
  • You can also write the values in the sketch itself, as the Arduino guide does.

Server and TLS ​

The library connects to the free Cloud server by default. On a private instance, define your domain before the first include, where YOUR_SERVER is your own domain:

cpp
#define THINGER_SERVER "YOUR_SERVER"

Most boards connect over TLS, to port 25202, and validate the server certificate. These connect without TLS, to port 25200: the Ethernet shield, the ENC28J60 module, the WiFi shield, the CC3000 module, the ESP8266 as Wi-Fi modem, the CC3200 and the LinkIt ONE. All the options are in Compile options.

The ESP32, the ESP8266, the Raspberry Pi Pico W and Pico 2 W, the Arduino UNO R4 WiFi, the Arduino UNO Q and the boards of the Arduino Zephyr core (ThingerZephyr) validate the server with a root certificate built into the library: the one of the free Cloud servers, or the one of Let's Encrypt when you set THINGER_SERVER. If the certificate of your instance comes from another authority, such as your own, define its root certificate in PEM format with THINGER_ROOT_CA, before the include. It replaces the default certificates:

cpp
#define THINGER_SERVER "YOUR_SERVER"
#define THINGER_ROOT_CA R"(-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----)"

#include <ThingerESP32.h>

Paste the whole certificate between the R"( and )" marks, with its BEGIN and END lines. thing.set_root_ca() can also set it from the sketch, in setup() or while the device runs; it takes effect on the next connection.

#define THINGER_INSECURE_SSL skips the certificate check, for a private instance with a self-signed certificate, on the ESP32, the ESP8266, the Raspberry Pi Pico W and Pico 2 W and the boards of the Zephyr core. The Wi-Fi module of the UNO R4 WiFi always checks the certificate: with this option it uses its own root certificates instead of the one of the library.

See also ​