Connect your board, send a sensor value to Virtuino Cloud, and watch it update live — then build a dashboard and add an automation rule. Just install the library, paste the sketch and flash.
Register for a free account and log in to the console.
In the console go to Keys & Sub Users and copy your HTTP API key — you'll paste it into the sketch.
Add a device (e.g. MyDevice) and its fields (e.g. temperature) from the console.
The device name and field names in your sketch must match exactly.
The VirtuinoCloud library handles HTTPS, JSON and multi-board support automatically. Install it from the Arduino Library Manager in three steps:
Open the Arduino IDE, select your board, paste the sketch below, fill in your
WiFi credentials, API key and device name,
then upload. It sends a temperature value every 10 seconds.
#include <WiFi.h> // ESP32
#include <VirtuinoCloud.h>
const char* SSID = "YOUR_WIFI_NAME";
const char* PASSWORD = "YOUR_WIFI_PASSWORD";
const char* API_KEY = "YOUR_API_KEY"; // Console -> API & Connections
const char* DEVICE = "MyDevice"; // 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 temperature = 20.0 + (millis() % 100) / 10.0; // replace with a real sensor read
// publish=true also pushes to MQTT so live dashboard widgets update instantly
bool ok = cloud.write(DEVICE, "temperature", temperature, true);
Serial.println(ok ? "Uploaded OK" : "Upload failed — check WiFi and API key");
delay(10000); // send every 10 seconds
}#include <ESP8266WiFi.h> // ESP8266 — use this instead of <WiFi.h>
#include <VirtuinoCloud.h> // also requires ESP8266 core >= 3.x
const char* SSID = "YOUR_WIFI_NAME";
const char* PASSWORD = "YOUR_WIFI_PASSWORD";
const char* API_KEY = "YOUR_API_KEY"; // Console -> API & Connections
const char* DEVICE = "MyDevice"; // 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 temperature = 20.0 + (millis() % 100) / 10.0; // replace with a real sensor read
bool ok = cloud.write(DEVICE, "temperature", temperature, true);
Serial.println(ok ? "Uploaded OK" : "Upload failed — check WiFi and API key");
delay(10000); // send every 10 seconds
}#include <WiFiNINA.h> // WiFiNINA boards: Uno WiFi Rev2, MKR WiFi 1010,
#include <VirtuinoCloud.h> // Nano 33 IoT, Nano RP2040 Connect
// also requires ArduinoHttpClient from Library Manager
const char* SSID = "YOUR_WIFI_NAME";
const char* PASSWORD = "YOUR_WIFI_PASSWORD";
const char* API_KEY = "YOUR_API_KEY"; // Console -> API & Connections
const char* DEVICE = "MyDevice"; // 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 temperature = 20.0 + (millis() % 100) / 10.0; // replace with a real sensor read
bool ok = cloud.write(DEVICE, "temperature", temperature, true);
Serial.println(ok ? "Uploaded OK" : "Upload failed — check WiFi and API key");
delay(10000); // send every 10 seconds
}Open the Serial Monitor (115200 baud) — you should see Uploaded OK. Then open the
Data Monitor in the console to see your values arriving live.
Create a dashboard, add a widget (gauge, chart, value display…) and bind it to your
temperature field. Your live data appears instantly.
Make it smart: add a rule such as "if temperature > 30 °C, send me an email" — or trigger another device, run a schedule, or execute a script.