# Documentation for WPI Java library

**URL:** <https://xrp.discourse.group/t/documentation-for-wpi-java-library/488>\
**Category:** Programming tools\
**Created:** [September 30, 2024, 6:32pm UTC](https://xrp.discourse.group/t/documentation-for-wpi-java-library/488 "2024-09-30T18:32:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![happychriggy](https://avatars.discourse-cdn.com/v4/letter/h/d78d45/32.png) [@happychriggy](https://xrp.discourse.group/u/happychriggy)\
**Post date:** [September 30, 2024, 6:32pm UTC](https://xrp.discourse.group/t/documentation-for-wpi-java-library/488/1 "2024-09-30T18:32:49Z")

</div>

I am trying to find the documentation for the XRP specific classes like XRPMotor or XRPServo on [WPILib Suite · GitHub](https://github.com/wpilibsuite). Could anyone please point me in the right direction. Thank you!

---

<div class="post-metadata">

**Author:** ![ktvu](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@ktvu](https://xrp.discourse.group/u/ktvu)\
**Post date:** [October 4, 2024, 3:54am UTC](https://xrp.discourse.group/t/documentation-for-wpi-java-library/488/2 "2024-10-04T03:54:35Z")

</div>

As of writing this, I have yet to find a documentation page that shows/explains the API for the XRP specific classes. However, if you know how to read Java (or C++) source code, then the WPILib GitHub repo that you linked does have the source code for all the classes in the XRP Vendordep.

- [XRP Vendordep Java](https://github.com/wpilibsuite/allwpilib/tree/main/xrpVendordep/src/main/java/edu/wpi/first/wpilibj/xrp)
- [XRP Vendordep C++ Source and Header Files](https://github.com/wpilibsuite/allwpilib/tree/main/xrpVendordep/src/main/native)

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [October 4, 2024, 10:24am UTC](https://xrp.discourse.group/t/documentation-for-wpi-java-library/488/3 "2024-10-04T10:24:47Z")

</div>

@ZeeQueue is there documentation for the XRP specific classes?

---

<div class="post-metadata">

**Author:** ![ZeeQueue](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/zeequeue/32/35_2.png) [@ZeeQueue](https://xrp.discourse.group/u/ZeeQueue)\
**Post date:** [October 4, 2024, 10:31am UTC](https://xrp.discourse.group/t/documentation-for-wpi-java-library/488/4 "2024-10-04T10:31:39Z")

</div>

There is a brief writeup of the motor and servo channels near the end of the firmware readme [GitHub - wpilibsuite/xrp-wpilib-firmware](https://github.com/wpilibsuite/xrp-wpilib-firmware)

These were meant to be drop in replacements for a Spark motor controller class, and the Servo class. Unfortunately I never got around to writing the docs for the line follower and rangefinder (although these just use AnalogInput under the hood, and the appropriate channel numbers are listed in the README as well)

---

<div class="post-metadata">

**Author:** ![XRPsubmersible](https://avatars.discourse-cdn.com/v4/letter/x/7ba0ec/32.png) [@XRPsubmersible](https://xrp.discourse.group/u/XRPsubmersible)\
**Post date:** [March 4, 2025, 12:57am UTC](https://xrp.discourse.group/t/documentation-for-wpi-java-library/488/5 "2025-03-04T00:57:02Z")

</div>

What do I need to change in the source code to add a 3rd and 4th servo?! We are tasked with making a submersible vehicle using the XRP board and our thruster’s ESCs use a servo style PWM. They work great off of the designated servo pins (device #4 and #5) but we need to add at least 1 more thruster (XRPservo device) to complete our project. What items in the firmware do we need to change? We are using WPI Lib VS Code in Java. We would like to use either the extra connector or the even the pins for the motor encoders. Thank you very much for your help!

---

<div class="post-metadata">

**Author:** ![Fgrossman](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Fgrossman](https://xrp.discourse.group/u/Fgrossman)\
**Post date:** [March 8, 2025, 3:24am UTC](https://xrp.discourse.group/t/documentation-for-wpi-java-library/488/6 "2025-03-08T03:24:46Z")

</div>

Currently the WPILib does not support a servo 3 and 4. There should be a release in the next few weeks that would help with that.
