{"id":15288266,"url":"https://github.com/milewski/drv8833-driver","last_synced_at":"2025-04-10T04:03:33.353Z","repository":{"id":231812549,"uuid":"780363165","full_name":"milewski/drv8833-driver","owner":"milewski","description":"Rust Driver for DRV8833 Dual Bridge Motor Driver.","archived":false,"fork":false,"pushed_at":"2024-04-06T06:11:12.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T04:02:44.722Z","etag":null,"topics":["drv8833","embedded","esp32","expressif-esp32","motor-driver"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milewski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-01T10:12:02.000Z","updated_at":"2025-02-02T19:57:08.000Z","dependencies_parsed_at":"2024-12-01T11:41:07.699Z","dependency_job_id":"381255cd-ba57-4dc4-81e8-e119ddd4380a","html_url":"https://github.com/milewski/drv8833-driver","commit_stats":null,"previous_names":["milewski/drv8833-driver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milewski%2Fdrv8833-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milewski%2Fdrv8833-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milewski%2Fdrv8833-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milewski%2Fdrv8833-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milewski","download_url":"https://codeload.github.com/milewski/drv8833-driver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154981,"owners_count":21056543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drv8833","embedded","esp32","expressif-esp32","motor-driver"],"created_at":"2024-09-30T15:44:58.243Z","updated_at":"2025-04-10T04:03:33.312Z","avatar_url":"https://github.com/milewski.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Driver for DRV8833 Dual Bridge Motor Driver\n\n[![Build](https://github.com/milewski/drv8833-driver/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/milewski/drv8833-driver/actions/workflows/rust.yml)\n[![Crate](https://img.shields.io/crates/v/drv8833-driver.svg)](https://crates.io/crates/drv8833-driver)\n[![Documentation](https://docs.rs/drv8833-driver/badge.svg)](https://docs.rs/drv8833-driver)\n\nDriver for the DRV8833 motor driver, supporting the operation of the motor in various modes.\nSee the [documentation](https://docs.rs/drv8833-driver) for more details.\n\nFor detailed information on the DRV8833, refer to the [datasheet](https://www.ti.com/lit/ds/symlink/drv8833.pdf).\n\n# Installation\n\nYou can install the package via Cargo:\n\n```sh\ncargo add drv8833-driver\n```\n\n## Usage\n\nBelow is an example demonstrating how to use the driver with the [esp-idf-hal](https://crates.io/crates/esp-idf-hal) crate:\n\n```rust\nuse esp_idf_hal::gpio::{AnyInputPin, Input, PinDriver};\nuse esp_idf_hal::ledc::{LedcDriver, LedcTimerDriver};\nuse esp_idf_hal::ledc::config::TimerConfig;\nuse esp_idf_hal::prelude::Peripherals;\n\nuse drv8833_driver::{MotorDriver, PwmMovement};\n\nfn main() -\u003e anyhow::Result\u003c()\u003e {\n    // Initialize peripherals\n    let peripherals = Peripherals::take()?;\n\n    // Initialize GPIO pins\n    let in1 = PinDriver::output(peripherals.pins.gpio1)?;\n    let in2 = PinDriver::output(peripherals.pins.gpio2)?;\n    let in3 = PinDriver::output(peripherals.pins.gpio3)?;\n    let in4 = PinDriver::output(peripherals.pins.gpio4)?;\n\n    // Initialize LEDC timer and driver\n    let timer = LedcTimerDriver::new(peripherals.ledc.timer0, \u0026TimerConfig::default())?;\n    let pwm = LedcDriver::new(peripherals.ledc.channel0, \u0026timer, peripherals.pins.gpio5)?;\n\n    // Initialize motor driver\n    let motor = MotorDriver::new_pwm_parallel(\n        in1, in2, in3, in4, pwm, None::\u003cPinDriver\u003cAnyInputPin, Input\u003e\u003e,\n    );\n\n    // Control the motor\n    motor.forward(100)?;\n    motor.reverse(100)?;\n    motor.stop()?;\n    motor.coast()?;\n\n    Ok(())\n}\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](./LICENSE) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilewski%2Fdrv8833-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilewski%2Fdrv8833-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilewski%2Fdrv8833-driver/lists"}