How to Send Sensor Data to the Cloud over Wi-Fi with Arduino UNO Q

You’ve blinked the LED. You’ve maybe spun a servo or read a button. But your Arduino still can’t tell you anything when you leave the room. Every reading, every measurement, trapped on a board tethered to your laptop’s Serial Monitor. That’s like owning a phone that only works on speakerphone, in your kitchen.
Here’s what we’re building today: a live cloud dashboard showing real-time temperature and humidity from a $4 sensor, sent wirelessly from your Arduino UNO Q. No extra Wi-Fi shields. No soldering. About 30 lines of code. The UNO Q ships with Wi-Fi 5 built right into the board, and we’re going to put it to work.
Data flows from a sensor at the edge, through Wi-Fi, up to the cloud where you can see it, store it, or act on it. Once you’ve done it once, every future IoT project follows the same shape.
What You’ll Need
Hardware:
- Arduino UNO Q
- DHT11 temperature/humidity sensor (or a DHT11 module with a built-in pull-up resistor)
- 3 jumper wires (male-to-male or male-to-female depending on your sensor)
- USB-C cable
- Breadboard (optional, but handy)
Software:
- An Arduino Cloud account (the free tier covers everything here)
- Arduino IDE 2.x or the Arduino Cloud Editor (browser-based, no install needed)
Total cost beyond the board is maybe $5.
How It Works: The 30-Second Version
The DHT11 sensor reads temperature and humidity. Your Arduino UNO Q grabs those readings, wraps them up, and sends them over Wi-Fi to Arduino Cloud. The cloud stores them and displays them on a dashboard you can check from any browser, anywhere.
Under the hood, Arduino Cloud uses MQTT (Message Queuing Telemetry Transport) to shuttle data between the board and the server. You don’t need to understand MQTT to finish this tutorial. Just know it’s there, doing the heavy lifting, and that it’ll matter later if you want to go further.
+--------+ +---------------+ Wi-Fi +----------------+
| DHT11 |------>| Arduino UNO Q |~~~~~~~~~~~~~~~>| Arduino Cloud |
| Sensor | | (reads data) | (MQTT) | (dashboard) |
+--------+ +---------------+ +----------------+Step 1: Wire the DHT11 Sensor
Three wires. That’s all.
Arduino UNO Q DHT11 Module
+--------------+ +------+
| 5V |----------| VCC |
| GND |----------| GND |
| Digital 2 |----------| DATA |
+--------------+ +------+
(If using bare DHT11, add a 10kΩ resistor
between VCC and DATA lines)In words: VCC→5V, GND→GND, DATA→Pin 2.
If you bought a bare DHT11 (the blue plastic cube with 4 pins), you’ll need a 10kΩ pull-up resistor bridging the VCC and DATA lines. If you bought a module (the little breakout board with 3 pins), the resistor is already soldered on. Most beginner kits ship the module version.
Double-check the wiring before powering on. A backwards sensor won’t break anything, but it’ll read garbage.
Step 2: Set Up Arduino Cloud IoT
This is where beginners tend to get stuck, so I’ll be specific.
Create your account. Go to cloud.arduino.cc and sign up. The free plan gives you 2 Things (we only need 1) and 100 messages per day (plenty for 5-second intervals during testing).
Add your device. Click Devices in the left sidebar, then “Add Device.” Select “Arduino Board,” then follow the on-screen prompts. You’ll need your UNO Q plugged in via USB-C. The Cloud Editor agent will detect the board and register it. Give it a name you’ll remember, like “UNO-Q-Desk.”
Create a Thing. Think of a “Thing” as a container for your project. Go to Things, hit “Create Thing,” and name it “Home_Sensor” (or whatever you like).
Add Cloud Variables. Inside your Thing, add two variables:
Thing: "Home_Sensor"
├── Variable: temperature
│ ├── Type: float
│ ├── Permission: Read Only
│ └── Update: Every 5 seconds
└── Variable: humidity
├── Type: float
├── Permission: Read Only
└── Update: Every 5 secondsSet each to float, Read Only, with a periodic update of Every 5 seconds.
Configure network credentials. In the Thing’s setup panel, there’s a “Network” section. Enter your Wi-Fi SSID and password here. Arduino Cloud stores these in a file called arduino_secrets.h, which keeps them out of your main sketch. Don’t skip this. If you ever share your code on GitHub, you don’t want your Wi-Fi password in it.
The Cloud will auto-generate a sketch skeleton for you. This is the file you’ll edit next.
Step 3: Write and Upload the Sketch
Here’s the complete sketch. If you’re using the Cloud Editor, most of this is already generated for you; you just need to add the DHT11 bits.
#include "thingProperties.h"
#include "DHT.h"
#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
delay(1500);
// Auto-generated cloud setup
initProperties();
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
// Start the sensor
dht.begin();
// Helps with debugging
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
float t = dht.readTemperature();
float h = dht.readHumidity();
if (!isnan(t) && !isnan(h)) {
temperature = t;
humidity = h;
}
delay(5000);
}Let’s walk through it.
#include "thingProperties.h" pulls in the auto-generated file that defines your cloud variables and Wi-Fi connection details. Don’t edit this file manually; the Cloud manages it.
#include "DHT.h" is the Adafruit DHT sensor library. To install it: in Arduino IDE, go to Sketch → Include Library → Manage Libraries, then search “DHT sensor library” by Adafruit. Install it, and also install “Adafruit Unified Sensor” when prompted. If you’re using the Cloud Editor, add it in the Libraries tab.
In setup(), those two calls, initProperties() and ArduinoCloud.begin(), replace what would otherwise be 30+ lines of manual Wi-Fi and MQTT configuration. dht.begin() initializes the sensor.
In loop(), ArduinoCloud.update() is the line that does everything. It maintains the Wi-Fi connection, talks to the MQTT broker, and syncs your local variables with the cloud. Call it every iteration. If you forget it, your dashboard stays blank.
After that, we read from the sensor, check that the values aren’t NaN (which the DHT11 returns when something’s wrong), and assign them to the cloud variables. The 5-second delay matches our cloud variable update interval.
Security reminder: Your Wi-Fi credentials live in arduino_secrets.h, not in this sketch. If someone asks you to paste your code in a forum, this file structure keeps your password safe by default.
Upload the sketch, open the Serial Monitor (set to 9600 baud), and watch for connection messages. You should see it grab an IP address and connect to Arduino Cloud within 10-15 seconds.
Step 4: Build Your Dashboard
In Arduino Cloud, click Dashboards in the sidebar. Create a new dashboard.
Add a Gauge widget. When prompted, link it to your temperature variable. Set the range to 0-50 (Celsius) or 32-122 (Fahrenheit). Add a second Gauge for humidity, range 0-100.
Hit Done. Within seconds, you should see live numbers updating on your screen.
If numbers are moving on your dashboard: congratulations, you just built an IoT device. That same sensor-to-cloud pipeline shows up in commercial smart home products, industrial monitors, and agricultural sensors. The scale changes, the pattern doesn’t.
When Things Go Wrong
| Symptom | Likely Cause | Fix |
|---|---|---|
| Board not found in Cloud | USB disconnected or wrong board selected | Re-plug USB-C, check Device Manager |
| Wi-Fi won’t connect | Wrong SSID/password, or 5 GHz-only network | Double-check credentials; ensure 2.4 GHz is enabled on your router |
| Dashboard shows no data | ArduinoCloud.update() missing from loop() | Verify your loop code matches the sketch above |
| Sensor reads NaN | Wiring issue or missing library | Check the DATA pin connection; confirm DHT library is installed |
| Data updates sporadically | Wi-Fi signal too weak | Move the board closer to your router for testing |
The Serial Monitor is your best friend here. Most connection errors print clear messages telling you exactly what failed.
Going Further: Third-Party MQTT Brokers
Arduino Cloud is great for getting started, but you might eventually want more control. Maybe you’re feeding data into Home Assistant, building a custom Node-RED dashboard, or just avoiding being tied to one platform.
Since Arduino Cloud speaks MQTT under the hood, the conceptual leap is small. You’d just be pointing at a different broker.
Two popular options: HiveMQ Cloud (free tier, hosted) and Mosquitto (self-hosted, runs on a Raspberry Pi). For both, you’d swap out the Arduino Cloud libraries for WiFiS3 (to manage Wi-Fi manually) and PubSubClient (a lightweight MQTT client). The workflow becomes:
- Connect to Wi-Fi with
WiFi.begin(ssid, password) - Connect to your MQTT broker with
client.connect("arduino-uno-q") - Publish readings with
client.publish("home/temperature", payload)
It’s more code (maybe 50-60 lines instead of 30) but you own every piece of the pipeline. If you’re building a fleet of sensors across a facility, or a product you plan to ship, that control starts to matter a lot. And when you need connectivity beyond local Wi-Fi, say you’re tracking assets outdoors or in transit, platforms like Hubble Network offer satellite and terrestrial IoT connectivity that picks up where Wi-Fi leaves off. (You can also explore their GitHub repository for example code and documentation.)
What to Build Next
You’ve got a working edge-to-cloud data pipeline. Here’s how to expand it.
Add more sensors. The UNO Q has plenty of pins. A light sensor, a soil moisture probe, an air quality sensor: each one is just another cloud variable and a few lines of code.
Set up triggers. Arduino Cloud lets you create automations. Get an email when temperature exceeds 30°C, or flip a smart plug on when humidity drops below 40%. These take about two minutes to configure in the dashboard.
Try a different board. The same Arduino Cloud workflow works with ESP32-based boards, the Nano 33 IoT, and others. That MQTT pattern you learned here? It works on anything with a network connection, from microcontrollers to Raspberry Pis.
The hardest part of IoT is getting that first data point from a sensor to a screen you can check from your couch. You just did that. Everything else is iteration.
Hubble Network enables direct satellite connectivity for IoT sensors—no Wi-Fi, no gateways, no range limits. See how it works →