Connect NuttyFi
Set up the Arduino IDE for your NuttyFi board, install the SMEIoT library, flash a sketch and check it connects. The same steps work for any ESP32 or ESP8266 board.
Pick your board
Choose your board. The steps and values below change to match it.
| Chip | |
| Boards Manager URL | |
| Board package | |
| Tools → Board | |
| Shows in SME AIoT as |
Set up the Arduino IDE
- Install the Arduino IDEDownload Arduino IDE 2 from arduino.cc/en/software and install it.
- Add the board URLOpen File → Preferences (on macOS: Arduino IDE → Settings). In Additional boards manager URLs, paste
and click OK. - Install the board packageOpen Tools → Board → Boards Manager, search for , find and click Install.
- Select the boardOpen Tools → Board and pick .
- Pick the portPlug the board in with a USB data cable. Open Tools → Port and pick the new port:
COM3or similar on Windows,/dev/cu.usbserial-…on macOS,/dev/ttyUSB0on Linux.
Install the SMEIoT library
- Download the library
- Add it to the IDEOpen Sketch → Include Library → Add .ZIP Library and pick the ZIP you downloaded.
- Install the two helper librariesOpen Tools → Manage Libraries. Search for and install PubSubClient (by Nick O'Leary) and ArduinoJson (by Benoit Blanchon).
- Check it workedOpen File → Examples → SMEIoT → Basic. If the example opens, the library is installed.
PubSubClient.h: No such file or directory.Flash and check the connection
Open the first sketch, paste in your credentials and Wi-Fi details, and click Upload. Then open Tools → Serial Monitor and set it to 115200 baud. Try each case below to see what the Serial Monitor shows and what to do.
The Serial Monitor shows what the board is doing. Most problems show up in the first few lines.
Troubleshooting
| What you see | What to do |
|---|---|
| No port in Tools → Port | Use a USB data cable, try another USB socket, and install the CP210x or CH340 driver for your board. |
| Upload fails: "Timed out waiting for packet header" | ESP32 boards: hold the BOOT button when Connecting... appears, and let go once the upload starts. |
| Stuck on "Connecting to WiFi..." | Check the Wi-Fi name and password (they are case-sensitive), and use a 2.4 GHz network. The board keeps retrying every 10 seconds. |
| "Register HTTP" is not 200 | The Dashboard ID or Device token is wrong, or the device was made on the other server. Copy the code from Device Info again. |
| "MQTT Failed" | The board retries on its own. Meanwhile the SDK still sends and receives data over HTTPS, so the device keeps working, just more slowly. |
| Strange characters in the Serial Monitor | Set the Serial Monitor to 115200 baud, the same as Serial.begin(115200) in the sketch. |
| Online, but the widget does nothing | Check the widget and your sketch use the same Telemetry Point, for example TP0 in both. |
Staging or production
The SDK connects to production unless you say otherwise. To test on staging, call SME.setServer() before SME.begin(). Staging and production have separate accounts and devices, so use the credentials of a device made on the server you pick.
void setup() { Serial.begin(115200); SME.setServer(SME_STAGING); // or SME_PRODUCTION (the default) SME.begin(DASHBOARD_ID, DEVICE_TOKEN, FIRMWARE_VERSION, WIFI_SSID, WIFI_PASS); }
At start-up the Serial Monitor prints [SME] Server: ... (shown masked here) so you can check which one the board is using.
Docs