Skip to main content

IoT

IoT blocks use the ConnectKit Arduino library to connect supported boards to WiFi or WIZnet Ethernet, then send HTTP requests over the active network connection.

These blocks support http:// URLs. HTTPS, MQTT, ENC28J60 Ethernet modules, and native ESP32 Ethernet PHYs are not supported by the current ConnectKit API.

Connections

Connect WiFi

Connect ESP8266, ESP32, or Arduino Uno R4 WiFi boards to a WiFi network.

Connect Ethernet

Connect through a WIZnet W5100, W5200, or W5500 Ethernet shield or SPI module using DHCP.

Disconnect network

Disconnect the active WiFi or Ethernet connection.

Network connected

Check whether the most recent WiFi, Ethernet, or custom network connection is active.

Local IP address

Get the IP address assigned to the active network connection.

Last network error

Read the latest ConnectKit network or HTTP error message.

Requests

Send request

Send a GET, POST, PUT, PATCH, or DELETE request. The block shows body and type inputs for POST, PUT, and PATCH requests.

Status code

Get the status code returned by the most recent HTTP request.

Request succeeded

Check whether the most recent HTTP request completed with a 2xx status code and no ConnectKit error.

Response body

Read the response body saved from the most recent HTTP request.

Advanced

Set HTTP header

Add or replace a custom header that will be sent with later HTTP requests.

Clear HTTP headers

Remove all custom headers from later HTTP requests.

URLs

URL encode

Encode text so it can be safely used inside a URL query string.

Add query parameter to URL

Add a URL-encoded query parameter to a URL.