Thing is, in the example you don’t even print the outcome…
Extra note, map(x, 0, 1023, 0, 100) looks okay but actually doesn’t make for a nice curve. Only value 1023 will map to 100 (where as for example the whole range 52 to 60 maps to 5). map(x, 0, 1024, 0, 101) will give a nicer result
Yeay, it will indeed output 100 if the input is 2130. But it will ONLY output 100 when input is 2130. Where as it will output 1 for the full input range of 269 to 287. Doing map(TPSreading, 250, 2131, 0, 101); fixes that