# Dexi IR Sensor stuck on "True"

**URL:** <https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991>\
**Category:** Technical Support (Official)\
**Created:** [November 1, 2024, 2:24pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991 "2024-11-01T14:24:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Brian](https://forum.theavr.org/u/Brian)\
**Post date:** [November 1, 2024, 2:24pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/1 "2024-11-01T14:24:44Z")

</div>

Hello, we are having trouble getting our IR sensor on the Dexi to give an output. when we go to /dexi/gpio\_input\_22 in the topic browser of the dexi dashboard like in the video, the value reads true when it should read false, and when we move the IR sensor over the IR beam it still reads true. we have updated the dexi to the newest version. thanks.

---

<div class="post-metadata">

**Author:** ![droneblocks](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.theavr.org/droneblocks/32/159_2.png) [@droneblocks](https://forum.theavr.org/u/droneblocks)\
**Post date:** [November 1, 2024, 2:34pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/2 "2024-11-01T14:34:35Z")

</div>

My best guess is that you need to check your wiring, but let me give a little more background. From this document:

> **[ir-breakbeam-sensors.pdf](https://cdn-learn.adafruit.com/downloads/pdf/ir-breakbeam-sensors.pdf)**
>
> 678.38 KB

on page 4:

```auto
The receiver is open collector which means that you do need a pull up resistor. Most
microcontrollers have the ability to turn on a built in pull up resistor. If you do not,
connect a 10K resistor between the white wire of the receiver and the red wire.

```

and you can see here in our ROS2 node for GPIO that we set the internal pull up:

> <https://github.com/DroneBlocks/dexi/blob/main/dexi_py/dexi_py/gpio_reader.py#L35>

If nothing is connected to that pin it will read true. Once the IR receiver is properly connected it will read false by default and true when it detects the beam.

But I could be totally off. Perhaps you can share a photo of your wiring?

---

<div class="post-metadata">

**Author:** ![Brian](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Brian](https://forum.theavr.org/u/Brian)\
**Post date:** [November 1, 2024, 3:37pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/3 "2024-11-01T15:37:38Z")

</div>

I double checked the wiring and everything looks right to me but here are some pictures.

 ![IMG_4095](https://canada1.discourse-cdn.com/flex007/uploads/avr/original/1X/6b8375d1f4b08b49970b5f4eafe272d7dde40db1.jpeg)

---

<div class="post-metadata">

**Author:** ![Brian](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Brian](https://forum.theavr.org/u/Brian)\
**Post date:** [November 1, 2024, 3:38pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/4 "2024-11-01T15:38:09Z")

</div>

![IMG_4096](https://canada1.discourse-cdn.com/flex007/uploads/avr/original/1X/68bd1f0ea4ecebbec43975e0da24d2e8dd852dc2.jpeg)

---

<div class="post-metadata">

**Author:** ![droneblocks](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.theavr.org/droneblocks/32/159_2.png) [@droneblocks](https://forum.theavr.org/u/droneblocks)\
**Post date:** [November 1, 2024, 5:19pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/5 "2024-11-01T17:19:50Z")

</div>

May I ask how you are powering the emitter side of things?

---

<div class="post-metadata">

**Author:** ![Brian](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Brian](https://forum.theavr.org/u/Brian)\
**Post date:** [November 1, 2024, 5:30pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/6 "2024-11-01T17:30:41Z")

</div>

we are hosting a competition tomorrow and currently have a field set up and ran it for testing.

---

<div class="post-metadata">

**Author:** ![droneblocks](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.theavr.org/droneblocks/32/159_2.png) [@droneblocks](https://forum.theavr.org/u/droneblocks)\
**Post date:** [November 1, 2024, 8:21pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/7 "2024-11-01T20:21:07Z")

</div>

Okay for some reason it looks like your cable may be pinned backwards. Here is what mine looks like:

 ![image](https://canada1.discourse-cdn.com/flex007/uploads/avr/original/1X/d4c99a7ffbad92abf148fe205a3c9a53b3d2ac79.jpeg)

I’m going to try to eyeball your pins and give you a mapping to work with the Receiver:

DEXI GPIO Red → IR Receiver Black  
DEXI GPIO Black → IR Receiver Red  
DEXI GPIO Blue → IR Receiver Yellow

Please confirm and sorry for the confusion. I need to check with the inventory team to see if we have an issue with our cable pinout or if this may be a one-off case. Thanks.

---

<div class="post-metadata">

**Author:** ![Daniel\_Print](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@Daniel\_Print](https://forum.theavr.org/u/Daniel_Print)\
**Post date:** [November 1, 2024, 8:39pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/8 "2024-11-01T20:39:30Z")

</div>

Make sure you are wiring based on position and not color. We had a similar issue by wiring based off color and realized the color orientation was different on our GPIO connector. The correct wire numbers if you are reading your GPIO mini micro pin connector from bottom to top in the image posted are wire 1 BLACK, wire 2 GREEN, wire 3 BLUE, wire 4 YELLOW, wire 5 WHITE, wire 6 RED. The correct wires in that order for IR sensor are 1,3, and 6. Which would be your BLACK, BLUE, and YELLOW wire. Try that orientation, hope it works! Also your wire 2 GREEN should go to laser sensor (trigger) input on mofset. Best of luck tomorrow!

Atlas - 78867A

---

<div class="post-metadata">

**Author:** ![droneblocks](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.theavr.org/droneblocks/32/159_2.png) [@droneblocks](https://forum.theavr.org/u/droneblocks)\
**Post date:** [November 1, 2024, 10:06pm UTC](https://forum.theavr.org/t/dexi-ir-sensor-stuck-on-true/991/9 "2024-11-01T22:06:33Z")

</div>

Glad y’all got it sorted and thanks for sharing your fix! @Brian FYI there is a pinout of the GPIO connector at this link:

- [dexi/docs/gpio.md at main · DroneBlocks/dexi · GitHub](https://github.com/DroneBlocks/dexi/blob/main/docs/gpio.md)
