# C++ Example Code for new programmers FRC

**URL:** <https://xrp.discourse.group/t/c-example-code-for-new-programmers-frc/439>\
**Category:** FIRST\
**Created:** [July 17, 2024, 8:23pm UTC](https://xrp.discourse.group/t/c-example-code-for-new-programmers-frc/439 "2024-07-17T20:23:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![E415LDC](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@E415LDC](https://xrp.discourse.group/u/E415LDC)\
**Post date:** [July 17, 2024, 8:23pm UTC](https://xrp.discourse.group/t/c-example-code-for-new-programmers-frc/439/1 "2024-07-17T20:23:47Z")

</div>

I’m a non-programmer Mentor for a FRC team attempting to fill the gaps of a missing Programming C++ Mentor. Our team is going to try to implement XRP robots as training aids in proxy of RoboRIOs. The example code provided via the WPILib installation is pretty good as far as it goes. But I can’t find any examples for the Rangefinder or Linefollower. I know we will probably never use the line follower as intended in a “real FRC” scenario. But it will still be a good tool for learning Automomous routines. If the XRP is going to be a REAL training tool, it will need complete support for all of its functions soon. The lack of input from the creators of the device on this page is very discouraging.

---

<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:** [July 19, 2024, 3:36pm UTC](https://xrp.discourse.group/t/c-example-code-for-new-programmers-frc/439/2 "2024-07-19T15:36:17Z")

</div>

@ZeeQueue Does support for this currently exist, or can it be added if not? Thanks!

---

<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:** [July 19, 2024, 4:00pm UTC](https://xrp.discourse.group/t/c-example-code-for-new-programmers-frc/439/3 "2024-07-19T16:00:53Z")

</div>

The XRP vendordep ([allwpilib/xrpVendordep at main · wpilibsuite/allwpilib · GitHub](https://github.com/wpilibsuite/allwpilib/tree/main/xrpVendordep)) which is automatically included in XRP template/example projects provides access to the XRPRangefinder and XRPReflectanceSensor classes that interface with the hardware.

Please add an issue here: [Issues · wpilibsuite/allwpilib · GitHub](https://github.com/wpilibsuite/allwpilib/issues) to keep track of this. Alternatively, this is also a great opportunity for contributing to WPILib!

---

<div class="post-metadata">

**Author:** ![E415LDC](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@E415LDC](https://xrp.discourse.group/u/E415LDC)\
**Post date:** [July 19, 2024, 11:07pm UTC](https://xrp.discourse.group/t/c-example-code-for-new-programmers-frc/439/4 "2024-07-19T23:07:48Z")

</div>

I found the CPP and Header files under the C++ dependencies. But, as I stated, I’m NOT a programmer and neither are the kids. That’s why we need “Example Code” so we can learn.

Thank you

Larry Chladek  
Mentor FRC Team 4624  
Rebel Alliance

---

<div class="post-metadata">

**Author:** ![E415LDC](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@E415LDC](https://xrp.discourse.group/u/E415LDC)\
**Post date:** [May 29, 2026, 2:39am UTC](https://xrp.discourse.group/t/c-example-code-for-new-programmers-frc/439/5 "2026-05-29T02:39:32Z")

</div>

As of this year I finally convinced the team to convert to Java to take advantage of all the support available.
