Buttplug Patterns
A composable interface for creating complex vibration patterns for buttplugio devices!
Creating Patterns
Patterns are created using a builder pattern, there are several primitives and methods to transform them to create complex patterns.
use ;
let my_pattern = new // Sine wave from 0.0 to 1.0 over 1 second
.repeat // repeat the sine wave for 2 cycles
.chain // pause for 1 second
.forever // repeat forever
Running Patterns
Patterns can be run using the Driver struct, which will actuate the pattern on connected devices.
use ;
use ;
let connector = new_json_ws_client_connector;
let bp = new;
bp.connect.await.unwrap;
new.run.await;