{"id":19138054,"url":"https://github.com/lemonpi/motorcontroller","last_synced_at":"2025-10-13T22:16:40.922Z","repository":{"id":73435560,"uuid":"109049972","full_name":"LemonPi/MotorController","owner":"LemonPi","description":"Arduino library for a H-Bridge motor controller","archived":false,"fork":false,"pushed_at":"2017-11-12T15:15:55.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T18:40:31.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LemonPi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-10-31T20:40:39.000Z","updated_at":"2017-10-31T20:41:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"3bf3440a-3dac-4a87-a50f-ec8c501519e1","html_url":"https://github.com/LemonPi/MotorController","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LemonPi/MotorController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2FMotorController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2FMotorController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2FMotorController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2FMotorController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LemonPi","download_url":"https://codeload.github.com/LemonPi/MotorController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LemonPi%2FMotorController/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017157,"owners_count":26085983,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T06:41:36.833Z","updated_at":"2025-10-13T22:16:40.902Z","avatar_url":"https://github.com/LemonPi.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Arduino library for a H-Bridge motor controller (driver) of a single motor\n\nTwo ways to use this:\n1. Drop directory directly inside sketch\n\nor\n\n1. Move directory under Arudino libraries directory\n2. In Arduino IDE with sketch open select Sketch \u003e Include Library \u003e WheelEncoder (should be under Contributed Libraries)\n\n## Usage\n\nConnect pins according to data sheet\n\n```c++\n#include \u003cArduino.h\u003e\n#include \u003cMotorController.h\u003e\n\n// H-Bridge pins\nconstexpr auto LOGIC_C = 8;\nconstexpr auto LOGIC_D = 9;\nconstexpr auto ENABLE_A = 3;\n\nMotorController mc(LOGIC_C, LOGIC_D, ENABLE_A);\n\nvoid setup() { \n    mc.setSpeed(50U);\n}\n\nvoid loop() {\n    // clockwise for 1s\n    mc.goClockWise();\n    delay(1000);\n    // coast stop (give 2 seconds)\n    mc.floatStop();\n    delay(2000);\n    // counterclockwise for 1s\n    mc.goCounterClockWise();\n    delay(1000);\n    // hard stop (give 2 seconds and compare difference with float stop)\n    mc.fastStop();\n    delay(2000);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonpi%2Fmotorcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemonpi%2Fmotorcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemonpi%2Fmotorcontroller/lists"}