This example sends data from the Pico LTE to a scriptr.io script over HTTP, on the cellular connection. Scriptr.io runs server-side scripts: backend APIs for IoT projects, developed and run in a web-based environment. The script is created with scriptr.io’s Creatr demo. No extra hardware is needed.
Before you begin
Hardware
- Sixfab Pico LTE or Pico LTE 2Registered and active in Sixfab Connect, connected to the computer with the micro USB cable.
Software
- Thonny with MicroPython and the Pico LTE SDKSet up as in the quickstart.
- config.jsonIn the root of the board: Prepare the configuration file.
- Scriptr.io accountSign in at scriptr.io/login, or register at scriptr.io/register.
Prepare scriptr.io
-
Test workspace.
In your workspace, open the default Hello Device script and click Run: it sends a first request.

-
Start Creatr demo.
Creatr connects a device to scriptr.io, creates a script for a use case and shows the device’s data. Open the Creatr page and click GET STARTED.
-
Select Other Device.

-
Create device.
Enter the device name and choose My device will push the data to a script.

-
Select HTTP.
Creatr creates the script. Note the scriptName and the Authorization token, then click Next.

Run example
-
Set script and token in config.json.
queryis the scriptName, with a slash in front (/scriptName);authorizationis the token.{ "scriptr": { "query": "QUERY_OF_SCRIPT", "authorization": "YOUR_TOKEN" } } -
Run send_data.py.
Open
examples/scriptr/send_data.pyfrom the SDK repository in Thonny and click Run.
INFO: Sending data to scriptr.io script... INFO: Result: {'status': 1, 'response': ['+QHTTPPOST: 0,400'], 'interval': 0} -
Check data.
In Creatr, choose the language of your device for the generated code and click Next. The received data appears on the Creatr page.

The rest of the demo is in the scriptr.io tutorial.

In the workspace, the data and the JSON map generated for it are shown.
