ADC sensor custom mapping

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 :slight_smile:

Is there a way to do this?

thanks
david

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

<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.

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

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

thanks for the Sketch