Hardware Demos

ESP32 / ESP8266 WiFi Direct

WiFi-capable microcontrollers connect directly to DataNet — no bridge computer needed.

An ESP32 or ESP8266 can authenticate via HTTPS, open a secure WebSocket, and pub/sub canonical telemetry channels completely autonomously once flashed. This is the right path for standalone IoT devices and wireless installations.

Source-backedRequires hardwareSensor Scalar

Reproduce it

The example project and SDK source live on GitHub — open them, then copy into your own project.

Take it further — SDK docs

Each platform has a canonical SDK reference with install steps, auth, and full API.

Technical details — compatibility, payload & channel names

Payload types

FloatJSON

Channel names

demo.scalar.temperatureStable telemetry channel for numeric sensor and script examples.

Example payload

{
  "sensor": "temperature",
  "value": 22.4,
  "unit": "C"
}

Compatibility notes

Browser JavaScriptNative
Node.jsNative
PythonNative
p5.jsNative
ProcessingNative
ArduinoJSON wrapped
ESP32 / ESP8266Native
Serial bridgeAdapter required
TouchDesignerNot yet supported

Run online

  • Flash-required — no online runnable. See the source files and README for wiring and library setup.

Run locally

  • 1. Install the DataNet Arduino library (copy packages/sdk-arduino into Arduino libraries folder).
  • 2. Install dependencies: ArduinoJson v7+ and WebSockets v2.4+ (Links2004) via Library Manager.
  • 3. Open TemperatureSensor.ino, fill in WIFI_SSID, WIFI_PASSWORD, and DATANET_API_KEY.
  • 4. Select your board (ESP32 Dev Module or NodeMCU/D1 Mini for ESP8266) and upload.
  • 5. Open Serial Monitor at 115200 baud to watch connection status.
  • 6. Subscribe from a browser playground or p5 sketch on the same channel.

Expected output

  • Board connects to WiFi, POSTs to /auth/token, opens WSS connection.
  • Publishes simulated temperature + humidity JSON every 5 seconds.
  • Subscribes to a commands channel and prints received messages to Serial.
  • Automatically reconnects with exponential backoff on disconnect.

Troubleshooting

  • If auth fails, double-check DATANET_API_KEY and that the board has internet access.
  • ESP8266 has ~80 KB heap — reduce DATANET_MAX_SUBS or DATANET_JWT_BUF_SIZE if you see memory errors.
  • SSL certificate verification is disabled by default (setInsecure). See README for certificate pinning options.