docs.rs failed to build cu-rp-encoder-1.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
cu-rp-encoder-1.1.0
Raspberry Pi based encoder driver for Copper
This driver is for the Raspberry Pi based encoder driver for Copper.
Compatibility
Any encoder with a base clock + a direction trigger.
Usage
On Linux hardware, provide both GPIO inputs through resource bindings:
resources: [
(
id: "enc",
provider: "cu_linux_resources::LinuxResources",
config: {
"gpio0_pin": 17,
"gpio0_direction": "input",
"gpio1_pin": 18,
"gpio1_direction": "input",
},
),
],
tasks: [
(
id: "src",
type: "cu_rp_encoder::Encoder",
resources: {
clk_pin: "enc.gpio0",
dat_pin: "enc.gpio1",
},
),
]
In mock mode, pins can be supplied through task config:
tasks: [
(
id: "src",
type: "cu_rp_encoder::Encoder",
params: {
clk_pin: 17,
dat_pin: 18,
},
),
]
The clk_pin is the pin for the clock signal and the dat_pin is the pin for the direction signal.
When you connect this driver to the rest of the system you need to use the cu_rp_encoder::EncoderMsg message type.
cnx: [
(src: "src", dst: "dst", msg: "cu_rp_encoder::EncoderMsg"),
],
It has been tested with a Hall effect encoder like this one: