I'm measuring voltage on an analog pin and using map to convert the data to volts (*5/1023 is inaccurate) but the result is not linear. I calibrated the top and bottom of the range, but in between it is inaccurate.
eg:
V = map(raw, 514,858,228,400)
(mv)
228 = 228
247 = 250
328 = 338
357 = 369
372 = 386
390 = 394
400 = 400
Average of 20 reads.
Nano.
Any ideas? Would there be different results on other pins?
Northland:
I'm measuring voltage on an analog pin and using map to convert the data to volts (*5/1023 is inaccurate) but the result is not linear. I calibrated the top and bottom of the range, but in between it is inaccurate.
eg:
V = map(raw, 514,858,228,400)
Any ideas? Would there be different results on other pins?
So you are mapping from 514 to 858 as data from the analog pin to 228 to 400 as output from the map function?
Never mind, I found testing other pins that a6 and a7 are fried, was using a0. Something bad happened.
So this nano can't be used for that job anyway since I needed all 22 outputs.