# Programing different connectors to run sensors

**URL:** <https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559>\
**Category:** Support\
**Created:** [December 3, 2024, 12:37pm UTC](https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559 "2024-12-03T12:37:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisEaton](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@ChrisEaton](https://xrp.discourse.group/u/ChrisEaton)\
**Post date:** [December 3, 2024, 12:37pm UTC](https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559/1 "2024-12-03T12:37:46Z")

</div>

For some reason on some of the XRP’s the sensor has stopped working on one device, but if we attach the sensor to another XRP robot it works. Is there a way to program the sensor to work from another connection. IE the “Line” sensor work out of the “Extra” connector?

---

<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:** [December 4, 2024, 12:37am UTC](https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559/2 "2024-12-04T00:37:24Z")

</div>

Hi there,

Which sensor are you referring to? And in what way did it stop working? Did you get any error messages, or is the data just bad?

---

<div class="post-metadata">

**Author:** ![ChrisEaton](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@ChrisEaton](https://xrp.discourse.group/u/ChrisEaton)\
**Post date:** [December 4, 2024, 3:24am UTC](https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559/3 "2024-12-04T03:24:04Z")

</div>

I have had problems with the range detector and line follower on different units. When I run the test to check out XRP they line sensor values do not change, same with the range values. But when I use the same sensor on another robot they do work.

---

<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:** [December 4, 2024, 5:16pm UTC](https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559/4 "2024-12-04T17:16:46Z")

</div>

Ok, sounds like the sensors themselves are fine then.

When you swap to the other robot, are you using the same cables? My hunch is that you have a bad cable, or a bad connector. If the cables all seem fine, then it’s possible your control board is damaged.

---

<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:** [December 4, 2024, 5:18pm UTC](https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559/5 "2024-12-04T17:18:30Z")

</div>

Also, the line sensor will only work on the “Line” connector, because that’s the only connector with 2x ADC-capable GPIO pins. And the GPIO pins on the “Extra” connector have other default uses, so best to leave that connector alone unless you know what you’re doing.

---

<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:** [December 4, 2024, 5:49pm UTC](https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559/6 "2024-12-04T17:49:17Z")

</div>

We have occasionally seen bent pins in the connectors. With the sensor unplugged you should be able to look down at the connector and see all 4 pins. Young eyes or a magnifier can help see if any of those are bent.

---

<div class="post-metadata">

**Author:** ![ChrisEaton](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@ChrisEaton](https://xrp.discourse.group/u/ChrisEaton)\
**Post date:** [December 4, 2024, 6:28pm UTC](https://xrp.discourse.group/t/programing-different-connectors-to-run-sensors/559/7 "2024-12-04T18:28:35Z")

</div>

Thanks, I know what you mean, I’ll check that out.
