I've recently bought this book.
It explains all the default libraries of the Arduino IDE environment and explain how to make a new one.
I was reading of the LiquidCrystal library and the example was a thermometer using a thermoresistor.
I found it long and hard but worked well, so I decided to test my new knowledge and make an easy-to-use library.
Part 0: Dissipation factorBefore continue you have to search in the datasheet the Dissipation factor(expressed in mw/dec C) of your thermoresistor, since I have the Elegoo thermoresistor that was an easy task for me(it was 2), but I you don't have any datasheet put the 6 value(It's the more common value).
Part 1: Setupgot to https://github.com/jack07Code/NTCReader and Download the library the open Arduino IDE and got to Sketch -> Include Library -> Add.ZIP library and select the location of the.zip file.
Part 2: CodeI've done an example that read's the temperature from the ntc and prints it on the Serial Monitor(It's also commented and explains every command of the library) you can find it on File -> Examples -> NTCReader-main -> Example, then load it on your Arduino board.
Part 3: HardwareGrab your Arduino board, a breadboard, your thermoresistor and a 10Kohm resistor and connect them in this way.
Now open the Serial Monitor with a baud rate of 9600 and watch your ntc taking a measure every second.
Comments
Please log in or sign up to comment.