Skip to main content

output

Send structured data from your device to the cloud. Use this to store sensor readings, telemetry, metrics, or any JSON data you want to persist and query later.

output_emit

Sends JSON data to the cloud.

Parameters:

  • json_data: Pointer to a null-terminated JSON string

Returns:

  • 0 on success, negative value on error
// @ts-ignore
@external("output", "output_emit")
export declare function outputEmit(jsonData: usize): i32;

// Example
const data = '{"temperature": 25.5, "humidity": 60}';
outputEmit(toCString(data));