Skip to content

feat(motorgo-plink): Add motorgo plink BSP compoenent#636

Merged
finger563 merged 4 commits into
mainfrom
feat/motorgo-plink
Jun 8, 2026
Merged

feat(motorgo-plink): Add motorgo plink BSP compoenent#636
finger563 merged 4 commits into
mainfrom
feat/motorgo-plink

Conversation

@finger563

@finger563 finger563 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds two new components:

  1. bdc_driver: a reusable brushed DC motor driver component built on ESP-IDF MCPWM for dual-PWM / H-bridge style motor control.
  2. motorgo-plink: a new BSP for the Every Flavor Robotics MotorGo Plink board.

The new espp::BdcDriver provides a generic two-output brushed motor interface with signed speed control, direct duty control, enable handling, and duty/raw-duty readback for debugging.

The new espp::MotorGoPlink BSP provides:

  • four dual-PWM DC motor channels
  • four MT6701 SSI encoder chip selects on a shared SPI bus
  • four servo signal pins
  • Qwiic and internal I2C buses
  • onboard LSM6DS33 IMU access via the shared lsm6dso driver
  • user and status LED control with out-of-phase breathing support

The Plink motor path now uses the new MCPWM-backed bdc_driver, which allows the onboard LEDs to continue pulsing while the motor outputs are active. This PR also includes the related README, Sphinx/Doxygen, CI, and component registry wiring for both new components.

Motivation and Context

This change adds first-class support for the MotorGo Plink hardware and factors its brushed motor control into a reusable component instead of keeping that logic BSP-specific.

It solves two problems:

  1. there was no BSP for MotorGo Plink in ESPP
  2. the board’s four dual-PWM motor channels are a better fit for MCPWM than LEDC, and moving them to MCPWM frees LEDC for the onboard indicator LEDs

The new bdc_driver also provides a reusable building block for future brushed DC motor boards and applications that use dual-PWM H-bridge drivers.

How has this been tested?

The changes were tested by building the new and updated examples with ESP-IDF on esp32s3:

  • components/bdc_driver/example
  • components/motorgo-plink/example

The MotorGo Plink example was also iterated to validate:

  • motor initialization failure handling
  • MCPWM-backed motor command logging
  • stronger sweep behavior for visible motion
  • concurrent LED breathing while motor control is enabled

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Copilot AI review requested due to automatic review settings June 8, 2026 17:29
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

finger563 added 2 commits June 8, 2026 15:51
…ter and use new bdc driver component rather than using ledc for motors and leds
@finger563 finger563 self-assigned this Jun 8, 2026
@finger563 finger563 requested a review from Copilot June 8, 2026 20:59
@finger563 finger563 added enhancement New feature or request bdc Related to Brushed DC Motors motorgo plink labels Jun 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.

Comment thread components/motorgo-plink/src/motorgo-plink.cpp
Comment thread components/motorgo-plink/src/motorgo-plink.cpp
Comment thread doc/Doxyfile
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@finger563 finger563 merged commit 922a3b9 into main Jun 8, 2026
108 of 110 checks passed
@finger563 finger563 deleted the feat/motorgo-plink branch June 8, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bdc Related to Brushed DC Motors enhancement New feature or request motorgo plink

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants