Get Started
HTTP · ~5 minutes

Your first value in the cloud

Eight steps, no sensor and no wiring. Copy the sketch, add your WiFi and API key, upload it, and watch the value arrive in your console.

ESP32 board
ESP32
ESP8266 board
ESP8266

Any ESP32 or ESP8266 board works. Nothing to wire — the sketch makes up the value itself.


1

Sign in to Virtuino Cloud

Use the Sign In button at the top of this page, or create a free account if you don't have one yet.

Sign In   Create Account

2

Find your HTTP API key

In the console open Keys & Sub Users and copy your Default Key from the HTTP API Keys panel.

Path to the HTTP API key: console menu, Keys and Sub Users tab, then the HTTP API Keys panel

Open Keys & Sub Users →

3

Nothing to create — it is already there

demo_device and demo_field_1 were created automatically when you registered. You can see them under Devices and Fields.

The auto-created demo_device and its fields in the Virtuino Cloud console

Devices  ·  Fields

4

Copy this code into the Arduino IDE

This is the complete sketch. It makes up a value around 25 and sends it every 3 seconds, so you can see data arriving before wiring any sensor.

#if defined(ESP32)
  #include <WiFi.h>          // ESP32
#else
  #include <ESP8266WiFi.h>   // ESP8266
#endif
#include <VirtuinoCloud.h>

const char* SSID     = "YOUR_WIFI_SSID";
const char* PASSWORD = "YOUR_WIFI_PASSWORD";
const char* API_KEY  = "YOUR_API_KEY";    // Console → Keys & Sub Users
const char* DEVICE   = "demo_device";     // must match device name in Console exactly

VirtuinoCloud cloud(API_KEY);

void setup() {
    Serial.begin(115200);
    WiFi.begin(SSID, PASSWORD);
    while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); }
    Serial.println("\nWiFi connected");
}

void loop() {
    float sensor_value = 25 + random(-5,+5);   // replace with a real sensor read

    bool ok = cloud.write(DEVICE, "demo_field_1", sensor_value);
    Serial.println(ok ? "Uploaded" : "Upload failed — check WiFi and API key");
    delay(3000);   // upload every 3 seconds
}
#include <WiFiNINA.h>       // Uno WiFi Rev2, MKR WiFi 1010, Nano 33 IoT, Nano RP2040
#include <VirtuinoCloud.h>  // also install ArduinoHttpClient from Library Manager

const char* SSID     = "YOUR_WIFI_SSID";
const char* PASSWORD = "YOUR_WIFI_PASSWORD";
const char* API_KEY  = "YOUR_API_KEY";
const char* DEVICE   = "demo_device";

VirtuinoCloud cloud(API_KEY);

void setup() {
    Serial.begin(115200);
    WiFi.begin(SSID, PASSWORD);
    while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); }
    Serial.println("\nWiFi connected");
}

void loop() {
    float sensor_value = 25 + random(-5,+5);   // replace with a real sensor read

    bool ok = cloud.write(DEVICE, "demo_field_1", sensor_value);
    Serial.println(ok ? "Uploaded" : "Failed");
    delay(3000);
}
5

Enter your API key and WiFi details

Replace the three placeholders at the top of the sketch with your own values.

const char* SSID     = "YOUR_WIFI_SSID";
const char* PASSWORD = "YOUR_WIFI_PASSWORD";
const char* API_KEY  = "YOUR_API_KEY";
6

Install the VirtuinoCloud library

In the Arduino IDE open Sketch → Include Library → Manage Libraries, search for VirtuinoCloud and click Install. Install ArduinoJson the same way.

VirtuinoCloud in the Arduino Library Manager
7

Select your board and upload

Choose the ESP32 or ESP8266 board and the correct serial port, then press Upload. Open the Serial Monitor at 115200 baud — you should see Uploaded every 3 seconds.

8

Watch the data arrive

Open the console and go to DataData Monitor. Select demo_device and demo_field_1 and your values appear.

Incoming values in the Virtuino Cloud Data Monitor

Open Data Monitor →


Watch it end to end

Real temperature and humidity in 5 minutes

The steps above get a made-up value into the cloud. This video does the whole thing with real hardware: an ESP32 and a DHT22 sensor, from wiring to a finished dashboard with gauges and a chart.

ESP32 and DHT22 sending temperature and humidity to Virtuino Cloud over HTTP

Watch on YouTube →

All the additional information

Everything beyond this first upload — more examples, the raw API, and the other protocols.

Start now — it's free