Docs / Get started / Quick start
Get started
Quick start
Get your first device online and control it from a dashboard in about ten minutes. You create the device in SME AIoT, paste two lines into a sketch, flash your board and add two widgets.
About 10 minutesNuttyFi · ESP32 · ESP8266Arduino IDESMEIoT SDK v1.2.0
What you need
1
A boardA NuttyFi, or any ESP32 or ESP8266 board, and a USB data cable.
2
Arduino IDEVersion 2 on your computer, set up for your board.
3
2.4 GHz Wi-FiESP32 and ESP8266 boards can't join 5 GHz networks.
4
SME AIoTAn account on nuttyengineer.cloud with Developer Mode on.
Try the whole flow
Walk through the four steps here first. Each one looks like the real screen, so you will recognise it when you do it for real.
WalkthroughLIVE
- 1Create the device
- 2Copy credentials
- 3Flash the board
- 4Go live
New device
This is the New device form from the Developer console. The values you pick here only label the device.
Boiler-1OfflineDevice Info
CONNECTION CREDENTIALS
Dashboard ID
Device token
Paste these two lines into your device code.
DEVICE DETAILS
The values here are examples. Your own device has its own.
first_device.inoArduino IDE
Ready
Serial Monitor · 115200 baud
Dashboard Online
Tap the Switch. The board sends TP1 every 2 seconds.
TP0 · TP1
Your device
A0 = 0
The sketch from step 3, running.
Step by step
- Turn on Developer ModeSign in to SME AIoT. Open your account menu (top right) and switch Developer Mode on. This is where you create devices and build their dashboards.
- Create the deviceIn the left panel, click New device. Enter a Project name you will recognise, such as Boiler-1, then pick a Device category, Connection type and Hardware. Click Get credentials & continue. The device is created and its dashboard opens.
- Copy the credentialsOn the dashboard, open Device Info. Under Connection credentials, click Copy code. This copies the two lines with your
DASHBOARD_IDandDEVICE_TOKEN. - Set up the board and the libraryIf the Arduino IDE isn't set up for your board yet, follow Connect NuttyFi. It covers the board package, the SMEIoT library and its two helper libraries.
- Paste the sketchCopy the sketch below into a new sketch. Replace the two
#definelines at the top with the ones you copied, and fill in your Wi-Fi name and password. - Upload and watch it connectClick Upload, then open Tools → Serial Monitor at 115200 baud. When you see
[SME] MQTT Connected, the device shows Online on its dashboard.
Offline until the first data arrivesA new device shows Offline until the board connects for the first time. It turns Online as soon as it does.
The first sketch
This sketch turns the on-board LED on and off from a Switch on TP0, and sends the analog reading on A0 to TP1 every 2 seconds.
#define DASHBOARD_ID "PROJ-••••••••" // from Device Info #define DEVICE_TOKEN "SME-••••-••••-••••" // from Device Info #define FIRMWARE_VERSION "1.0.0" #define WIFI_SSID "your_wifi" #define WIFI_PASS "your_password" #include <SMEIoT.h> SME_LISTEN(TP0) // a Switch on TP0 writes here { digitalWrite(2, data.toInt()); // on-board LED } unsigned long lastSend = 0; void setup() { Serial.begin(115200); pinMode(2, OUTPUT); SME.begin(DASHBOARD_ID, DEVICE_TOKEN, FIRMWARE_VERSION, WIFI_SSID, WIFI_PASS); } void loop() { SME.run(); // keep this at the top of loop() if (millis() - lastSend >= 2000) { // every 2 seconds lastSend = millis(); SME.publish(TP1, analogRead(A0)); // a Value on TP1 shows it } }
| Line | What it does |
|---|---|
| SME_LISTEN(TP0) | Runs whenever the dashboard writes TP0. data holds the value as text. |
| SME.begin(...) | Connects to Wi-Fi and SME AIoT with your device's credentials. Call it once in setup(). |
| SME.run() | Keeps the connection alive and delivers commands. Keep it at the top of loop() and avoid long delay() calls. |
| SME.publish(TP1, value) | Sends a number or text to a Telemetry Point. Send on a timer or when the value changes. |
Keep the credentials privateAnyone with your Dashboard ID and Device token can send data as your device. Don't post them in screenshots, chats or public code.
Next steps
Board setupConnect NuttyFiArduino IDE, the SMEIoT library, flashing and fixes.HardwareSupported hardwareWhich boards work today and how they connect.DashboardWidgetsEvery widget, with a live simulation and device code.
Was this page helpful?
Docs