Crates.io | cu-rp-encoder |
lib.rs | cu-rp-encoder |
version | |
source | src |
created_at | 2024-09-30 20:57:40.318215 |
updated_at | 2024-12-05 22:18:36.26601 |
description | This is a driver for the Raspberry Pi to decode a directional encoder from GPIOs. |
homepage | https://github.com/copper-project |
repository | https://github.com/copper-project/copper-rs |
max_upload_size | |
id | 1392205 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This driver is for the Raspberry Pi based encoder driver for Copper.
Any encoder with a base clock + a direction trigger.
Add the driver like any other source in Copper:
tasks: [
(
id: "src",
type: "cu_rp_encoder::Encoder",
params: {
pin_clt: 17,
pin_dat: 18,
},
),
]
The pin_clt
is the pin for the clock signal and the pin_dat
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: