# ADC sensor custom mapping

**URL:** <https://forum.realdash.net/t/adc-sensor-custom-mapping/5785>\
**Category:** Custom Hardware / Electronics\
**Created:** [July 9, 2024, 2:04am UTC](https://forum.realdash.net/t/adc-sensor-custom-mapping/5785 "2024-07-09T02:04:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sigogglin](https://forum.realdash.net/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@Sigogglin](https://forum.realdash.net/u/Sigogglin)\
**Post date:** [July 9, 2024, 2:04am UTC](https://forum.realdash.net/t/adc-sensor-custom-mapping/5785/1 "2024-07-09T02:04:11Z")

</div>

I can see how to add a custom map to an ADS input. Where I can create an input/output mapping.

I’m looing into building a tranmission shift indicator, essentially a potentiometer connected to the transmission shift lever. When the position is changed the pot will output a different voltage.

I’d like to be able to use a custom map that takes an input value and maps it to letter, P, R, N, D, 2, 1.

When I try to put a P into the output map, it doesn’t like that 🙂

Is there a way to do this?

thanks  
david

---

<div class="post-metadata">

**Author:** ![Sigogglin](https://forum.realdash.net/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@Sigogglin](https://forum.realdash.net/u/Sigogglin)\
**Post date:** [July 9, 2024, 2:25am UTC](https://forum.realdash.net/t/adc-sensor-custom-mapping/5785/2 "2024-07-09T02:25:17Z")

</div>

I found the XML docs and I think this should work:

```auto
<value name="Custom Shifter position" offset="7" length="1" enum="0~10:P,11~20:R,21~100:N,150~200:D,#:err"></value>

```

However when I tried it I don’t get the err label, but my CAN device isn’t working, I just loaded the XML file. I still thought it would print something.

---

<div class="post-metadata">

**Author:** ![Sigogglin](https://forum.realdash.net/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@Sigogglin](https://forum.realdash.net/u/Sigogglin)\
**Post date:** [July 10, 2024, 11:51am UTC](https://forum.realdash.net/t/adc-sensor-custom-mapping/5785/3 "2024-07-10T11:51:39Z")

</div>

I got is all sorted. I used this arduino sketch:

> **[GitHub - janimm/RealDash-extras: RealDash examples and technical materials](https://github.com/janimm/RealDash-extras)**
>
> RealDash examples and technical materials. Contribute to janimm/RealDash-extras development by creating an account on GitHub.

Modified one of the analog inputs, used a pot and can see the gears change.

thanks for the Sketch
