How to set up temperature input from sensor? (noob question :-) #73
nadavmatalon
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Thank you very much for sharing this great library!
Having looked at the library in general and example codes in particular, I have a noob question relating to my project.
I'd like to get the real-time temperature input of a hot plate from a PT-100 and use that as the input for the temperature PID control so as to get a stable temperature target on the hot plate (say, 180 degrees Celsius).
I already figured out how to get real-time temperature readings (in degrees Celsius) from the PT-100 every second, but the examples expect an "analogRead" input and I'm not sure how to go about matching/converting between the two values? (that is, the temp readings in degrees Celsius (int value) on the one hand, and the expected analog read input (0-255 or 0-1024?) on the other).
Should I simply use Arduino's "map" function and plug the result in the code instead of the expected "analogRead" value? or is there a better way of getting this done?
Any help would be very much appreciated and example code would be even better :-)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions