pamoja_actuators/lib.rs
1#![no_std]
2
3//! Concrete actuator drivers for the pamoja SDK.
4//!
5//! Where [`pamoja-sensors`](https://docs.rs/pamoja-sensors) decodes what a part
6//! reports, this crate encodes what a part should do: it turns a desired output (a
7//! PWM frequency and duty, a servo angle, a motor step) into the exact register bytes
8//! or coil pattern a driver writes to the hardware. Like the rest of the SDK's
9//! hardware crates, it is the command half ahead of the actual bus driver, pure logic
10//! with no I/O, so the same code runs on a microcontroller and in a test.
11//!
12//! - [`pca9685`] - the NXP PCA9685 16-channel 12-bit PWM controller, the common way
13//! to drive servos, dimmable LEDs, and motor-driver inputs over I2C. Its register
14//! map, prescale formula, and channel words follow the datasheet.
15//! - [`stepper`] - coil sequencing for four-wire stepper motors: the wave, full-step,
16//! and half-step drive patterns, plus a step-and-direction position model for
17//! driver chips that take a step pulse and a direction level.
18//!
19//! Simple on/off actuators (relays, solenoid valves, a pump switched through a
20//! transistor) need no driver of their own: they are a GPIO line, modelled by the pin
21//! and logic-level types in [`pamoja-gpio`](https://docs.rs/pamoja-gpio).
22
23pub mod pca9685;
24pub mod stepper;