Connectivity

RemoteSensor Block

Stream live sensors from your mobile device via WebRTC. Features 3-axis acceleration and 3-axis rotation.

Open RemoteSensor in BlockWerk →

# RemoteSensor Block

Description

RemoteSensor is a source block that streams live inertial and optional sensor data from a paired mobile device into the simulation over a WebRTC peer-to-peer connection. When the block is placed on the canvas it generates a pairing QR code; scanning it from the phone's browser establishes the link. Once connected, the block exposes accelerometer (3-axis), gyroscope (3-axis), and a buffer health signal as output ports, with additional ports added automatically when the phone reports magnetometer, barometer, or GPS capability.

Use this block for motion-based control experiments, gesture input, or hardware-in-the-loop tests where a mobile device acts as a wireless inertial measurement unit. A configurable playout buffer and interpolation filter smooth the variable-rate network stream before it enters simulation blocks.

Parameters

playoutDelay

Buffering latency in milliseconds (0–500 ms, UI only). Adds a fixed lookahead window to absorb network jitter. Default: 250.

interpolation

Reconstruction filter applied between received sensor packets (UI only). Options: none (zero-order hold), linear, or pchip (smooth monotone cubic). PCHIP produces smoother signals but is more CPU-intensive. Default: linear.

outputLabels

Comma-separated list of output port labels (one per port in declaration order). Used internally; edit via the block properties panel rather than directly.

Examples

Use phone tilt as a reference input to a PID loop

RemoteSensor ──► [Tilt Beta] ──► Gain ──► PIDController → [in]

Log all 6 DOF inertial signals to a scope

RemoteSensor ──► [Accel X]        ┐
               ──► [Accel Y]      ├──► Scope
               ──► [Accel Z]      │
               ──► [Rotation Alpha]│
               ──► [Tilt Beta]    │
               ──► [Tilt Gamma]   ┘

Remarks

See Also