Ez430-Chronos Wrist Watch icon Ez430-Chronos Wrist Watch — Map TI eZ430-Chronos watch accelerometer X/Y tilt to ARC servos for intuitive, Wii-Remote-style control of servo positions. Try it →
 

Network

Check the internet connection, download web pages, post to web services and send UDP messages.

Where to find it: the Network category of the toolbox, in any script editor set to Blockly or on Top bar → Workspaces → Blockly


Blocks

The Network category of the toolbox
The Network category of the toolbox
Block What it does
The internet is available True when this computer can reach the internet.
Download … waiting up to … ms Fetch a web address (HTTP GET) and return what the server sends back, such as a web page or JSON.
Post to … data … waiting up to … ms Send data to a web address (HTTP POST) and return what the server sends back.
Post to … data … waiting up to … ms header names … header values … Send data to a web address (HTTP POST) with request headers, such as a content type or an API key, and return what the server sends back.
Send UDP bytes … to … port … Send a UDP packet of bytes (numbers 0 to 255) to a computer on the network.

Details

The internet is available

The The internet is available block
The The internet is available block

True when this computer can reach the internet.

In JavaScript: this block gives back the value of

Net.isInternetAvailable()

Download … waiting up to … ms

The Download … waiting up to … ms block
The Download … waiting up to … ms block

Fetch a web address (HTTP GET) and return what the server sends back, such as a web page or JSON.

In JavaScript: this block gives back the value of

Net.HTTPGet('https://synthiam.com', 2000)

Post to … data … waiting up to … ms

The Post to … data … waiting up to … ms block
The Post to … data … waiting up to … ms block

Send data to a web address (HTTP POST) and return what the server sends back.

In JavaScript: this block gives back the value of

Net.HTTPPost('https://synthiam.com', 'name=robot', 2000)

Post to … data … waiting up to … ms header names … header values …

The Post to … data … waiting up to … ms header names … header values … block
The Post to … data … waiting up to … ms header names … header values … block

Send data to a web address (HTTP POST) with request headers, such as a content type or an API key, and return what the server sends back. The two lists pair up: the first name with the first value.

In JavaScript: this block gives back the value of

Net.HTTPPost('https://synthiam.com', '{"name":"robot"}', 2000, ["Content-Type"], ["application/json"])

Send UDP bytes … to … port …

The Send UDP bytes … to … port … block
The Send UDP bytes … to … port … block

Send a UDP packet of bytes (numbers 0 to 255) to a computer on the network.

In JavaScript: this block runs

Net.sendUDP('192.168.1.10', 5000, [72, 105]);