> For the complete documentation index, see [llms.txt](https://yagsl.gitbook.io/yams/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yagsl.gitbook.io/yams/documentation/how-to/how-do-i-use-a-dcmotor-that-isnt-in-wpilib.md).

# How do I use a DCMotor that isn't in WPILib?

Sometimes the motor you're using is so new that no one has PR'd it into WPILIb.

{% @github-files/github-code-block url="<https://github.com/wpilibsuite/allwpilib/blob/main/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java#L166-L175>" %}

Creating your own `DCMotor` isn't too difficult and can be done easily if you use ReCa.lc to fill in the blanks

{% embed url="<https://www.reca.lc/motors>" %}

{% @github-files/github-code-block url="<https://github.com/wpilibsuite/allwpilib/blob/main/wpimath/src/main/java/edu/wpi/first/math/system/plant/DCMotor.java#L45-L61>" %}

For example a [Minion](https://store.ctr-electronics.com/products/minion-brushless-motor) would be

```java
int numMotors = 1;
new DCMotor(12, 3.1, 200.46, 1.43, RPM.of(7200).in(RadiansPerSecond), numMotors);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yagsl.gitbook.io/yams/documentation/how-to/how-do-i-use-a-dcmotor-that-isnt-in-wpilib.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
