Sensor Functions
dev.io.sensors - wire path i\s - generated from fwMenuSensors.
enable_accel_stream
Stream Accel. Streams accelerometer (and temperature) data to the host at the given rate.
Wire command: i\s\o
| Arg | Wire type |
|---|---|
| stream_rate_ms | decS32 |
Returns: none (Ok/Err only)
dev.io.sensors.enable_accel_stream(stream_rate_ms: int) -> Result
ow_status ow_io_sensors_enable_accel_stream(ow_device* dev, int32_t stream_rate_ms);
dev.io().sensors().enable_accel_stream(stream_rate_ms: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.io.sensors.enable_accel_stream(stream_rate_ms) # check dev.ok
Events
Spontaneous frames this menu emits (not command responses). Text events arrive as [*<id> ...] frames (Python: Transport.events; C: ow_poll_text_event; Rust: poll_event -> Event::Text); binary events use the binary API below. The on-device rthon binding does not receive event streams in v1.
accel (text)
Accelerometer Data
| Payload field | Wire type |
|---|---|
| range | decS32 |
| x | decS32 |
| y | decS32 |
| z | decS32 |
| temp_c | decS32 |
| temp_f | decS32 |
| is_moving | bool |