sts3215

Crates.iosts3215
lib.rssts3215
version0.0.2
created_at2025-12-28 12:33:25.407169+00
updated_at2025-12-30 09:35:42.415387+00
descriptionA no_std compatible library for controlling STS3215 serial servo motors with embedded-io support
homepagehttps://github.com/flyaruu/sts3215
repositoryhttps://github.com/flyaruu/sts3215
max_upload_size
id2008745
size64,439
Frank Lyaruu (flyaruu)

documentation

https://docs.rs/sts3215

README

STS3215

This is a no-std capable library to use serial sts3215 servo's

It works alright on std for a 6 servo lerobot model. The monitor example uses a ratatui text view to monitor servo id's 1-6, this is pretty convenient to check if your setup of your servos id configuration etc is correct.

The lerobot builds a general 'Robot' struct which owns a SerialPort, a buffer and a number of servo's, which makes the whole thing easier to use, but it is still in development and I'm not 100% convinced it's adding much.

The comm module does the actual reading and writing to the serial port, it uses the embedded-io traits for no-std compatibility, and converts it into std Read/Write traits using the embedded-io-adapters crate.

For reference, check this document

Note: I haven't tried running it in no-std mode, it does compile on an esp32 project. head....id..ln.inst..1...2...3...4...5...6...7...8 [ff, ff, 01, 09, 03, 2a, 20, 03, e8, fd, 10, 27, 89]

2a20

03e8

Future work

  • It queries all aspects of a servo separately (i.e. the read_servo_info function). I guess this is inefficient, it would be quicker to query all the relevant registers at once and parse it into a ServoState structure.
  • Does it make sense to use async? Perhaps for no_std it makes sense as we do not have threads.
Commit count: 0

cargo fmt