About XRP-WPILib
This firmware for the XRP robot works in conjunction with the WPILib XRP extension to support writing WPILib robot programs and running them on low cost XRP robots.
Important Note for V2.0.1
This firmware version adds support for the new, non-beta XRP control board. This new board is powered by an RP2350 and is faster, has more memory, and also provides additional IO (including 2 extra servo channels). Both beta and non-beta boards will continue to be supported, although given the processor change between the 2 boards, there are now 2 firmware flavors. If you have the beta board, install the firmware with -beta
in the filename. Otherwise, install the one which does NOT have -beta
in the filename. If you aren't sure which version of the board you have, take a look at this page which has a comparison diagram of the beta and non-beta boards.
While this version provides no additional (user-facing) functionality, there has been some amount of refactoring done to add support for the new, non-beta board. We have tested this firmware version with both board variants, but if you see any issues, please let us know!
WPILib Hardware Support
- Onboard LED and Pushbutton exposed as DIO channels 0 and 1
- 2 motors (left/right) exposed as
XRPMotor
channels 0/1 (These behave similarly to PWM based motor controllers) - 2 additional motors (motor3/motor4) exposed as
XRPMotor
channels 2/3 - 2 servo outputs (servo1/servo2) exposed as
XRPServo
channels 4/5 - (On non-beta board) 2 additional servo outputs (servo3/servo4) exposed as
XRPServo
channels 6/7 - Encoders for each motor (channel 4/5 for Left, channel 6/7 for Right, channel 8/9 for motor3, channel 10/11 for motor4)
- 3-axis gyro exposed as
XRPGyro
- 3-axis accelerometer exposed as
BuiltInAccel
- Support for XRP reflectance sensor (reporting Left/Right values on Analog 0/1)
- Support for XRP Rangefinder (reporting values on Analog 2)
Note on WPILib support for Non-Beta boards: Current versions of WPILib (2025.3.2 and below) will only support up to 2 servos when using the XRP Vendordep. An update to WPILib to add support for servo 3 and 4 on the non-beta board will be coming shortly.
Difference between XRP and Romi capabilities
For the most part, code written for the Romi and XRP are interchangeable. The main difference being that anywhere a Spark
motor controller was used in Romi code should be replaced with a XRPMotor
(with same channel numbers) for the XRP. Similarly anywhere a Servo
object was used in Romi code should be replaced with a XRPServo
.
Additionally, the XRP only has a single pushbutton and LED, compared to the 3 each for the Romi. Thus, DIO channels 3 and 4 are not used on the XRP.
Finally, the XRP requires the use of a XRP specific WPILib HAL Sim extension.
Changes from v1.1.0
- Add support for the non-beta XRP control board
Known Issues
- There is a known bug where if you have a brand new board, the configuration will build incorrectly and you will not be able to connect to it because the SSID is blank. This has been fixed in v2.0.1
What's Changed
- Added support for new Sparkfun RP2350 board by @jpokornyiii in #47
- Fixing issue with first board setup by @jpokornyiii and @oddron #48
Full Changelog: v1.1.0...v2.0.0