Using Multi map to change AnalogRead to different Value

Hey Guys,

i am trying to read a thermistor and output the result to a dash designed for a different thermistor, i have mapped the voltages through the temp range but it's well above me how to implement it into the code, someone gave me the this answer in another post

johnwasser: This function will do what you want. It maps between two piecewise curves. You could use it to map the new analogRead() value to the old value.

Use the pot to determine what analogRead() values represent what readings on your new dashboard. Use a thermometer and heat source to see what those same temperatures read as on your new thermistor. Then map the two ranges.

so if the old sensor readings are between 0.915V and 0.275v between 80 different temp readings and the dash wants to see a range between 2.89V and 0.465V for the same temp readings, how do i translate that into this code?

i wish i knew more about C++ but i'm slowly learning

Won't you have to recalibrate your array anyway?

sorry i only looked at the link, it looks easier now

so it would be like

temp = map(x , 0,275, 0.915, 0.465, 0.289)

using ADC values (not sure if I've converted them accurately)

temp = map(x , 56, 186, 58, 94)

is this the right track?

Only if the readings are linear. But then you wouldn't need an array. You could just use math. You would only need to calibrate the end points.

It's unlikely that the two thermistors have the same response curve. So a remap will only get you in the ball park.

i see what you mean, so is there a way to use all my plotted values and have something like a look up table for it to fetch a reading and then look up its replacement or would this use to much memory?