# How do we run WPILib code on the XRP?

**URL:** <https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61>\
**Category:** Programming tools\
**Created:** [September 16, 2023, 12:50am UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61 "2023-09-16T00:50:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@andy](https://xrp.discourse.group/u/andy)\
**Post date:** [September 16, 2023, 12:50am UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/1 "2023-09-16T00:50:42Z")

</div>

As I understand it, we can get the XRP to execute Java code via a websockets connection. Does the existing onboard webserver support that already? Or do we need to write a websocket connection handler? Also, from the WPILib side, how do we plumb this all together?

---

<div class="post-metadata">

**Author:** ![SparkFro](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/sparkfro/32/12_2.png) [@SparkFro](https://xrp.discourse.group/u/SparkFro)\
**Post date:** [September 16, 2023, 2:03pm UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/2 "2023-09-16T14:03:10Z")

</div>

Using WPILib with the XRP requires loading separate firmware onto the XRP. The [GitHub for that is here](https://github.com/wpilibsuite/xrp-wpilib-firmware), which has instructions on how to use it, and the firmware itself is available in the [Releases](https://github.com/wpilibsuite/xrp-wpilib-firmware/releases).

The WPILib/XRP implementation is currently functional, but note that it’s still in an alpha state, so there are likely to be more changes as everything gets fleshed out. The most recent update is an [XRP specific plugin in WPILib](https://github.com/wpilibsuite/allwpilib/pull/5631), which just got merged yesterday. I expect there will be a new release of the XRP firmware soon to make use of that new plugin, so keep an eye on that for when it becomes available.

---

<div class="post-metadata">

**Author:** ![andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@andy](https://xrp.discourse.group/u/andy)\
**Post date:** [September 16, 2023, 7:00pm UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/3 "2023-09-16T19:00:24Z")

</div>

Thanks. Although I am tempted by the alpha release, I think I will wait for the first beta.

Will you be updating us via the Announcements and Help channel? Or should we subscribe to the repo changes?

---

<div class="post-metadata">

**Author:** ![SparkFro](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/sparkfro/32/12_2.png) [@SparkFro](https://xrp.discourse.group/u/SparkFro)\
**Post date:** [September 19, 2023, 9:09pm UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/4 "2023-09-19T21:09:05Z")

</div>

I don’t know if updates will be posted here regarding XRP-WPILib updates. @Fgrossman or @bamiller can you provide an answer on that?

If you don’t want to miss any updates, then subscribing to that repo should keep you updated!

---

<div class="post-metadata">

**Author:** ![andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@andy](https://xrp.discourse.group/u/andy)\
**Post date:** [September 20, 2023, 4:12pm UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/5 "2023-09-20T16:12:45Z")

</div>

Sounds good. I am now subscribed.

Are there any other repos that would be worth watching for XRP specific code?

---

<div class="post-metadata">

**Author:** ![SparkFro](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/sparkfro/32/12_2.png) [@SparkFro](https://xrp.discourse.group/u/SparkFro)\
**Post date:** [September 20, 2023, 4:29pm UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/6 "2023-09-20T16:29:16Z")

</div>

The [XRPLib repo](https://github.com/Open-STEM/XRP_MicroPython) is probably also worth watching if you want to stay updated on the MicroPython library for the XRP. Patch notes for those should also appear at [xrpcode.wpi.edu](https://xrpcode.wpi.edu) if there’s been any updates since you last visited it.

---

<div class="post-metadata">

**Author:** ![andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@andy](https://xrp.discourse.group/u/andy)\
**Post date:** [September 20, 2023, 5:13pm UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/7 "2023-09-20T17:13:09Z")

</div>

Great, I have added it to my watch list. Out of curiosity, where would we find the repo for the xrpcode editor? There might be a situation where we need to host it locally - firewall issues etc., and it would be nice to have experimented with running a local copy before hand.

---

<div class="post-metadata">

**Author:** ![SparkFro](https://yyz1.discourse-cdn.com/flex011/user_avatar/xrp.discourse.group/sparkfro/32/12_2.png) [@SparkFro](https://xrp.discourse.group/u/SparkFro)\
**Post date:** [September 20, 2023, 5:33pm UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/8 "2023-09-20T17:33:56Z")

</div>

I think @Fgrossman might be able to answer that one

---

<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:** [September 20, 2023, 5:46pm UTC](https://xrp.discourse.group/t/how-do-we-run-wpilib-code-on-the-xrp/61/9 "2023-09-20T17:46:31Z")

</div>

Yes. We will announce updates to the WPILib as they hit the alpha and beta stages. The XRPCode will auto update for you when we release. That will bring up release notes when it happens and will automatically update the XRPLib.
