Temperature script

Hello, how can i make script for this module KY-028 digital temperature sensor to show temperature in °C. Please help me i need it im beginner in arduino.

Have you considered doing a search on the forum for KY-028 ?

HI ichnar,

welcome to the forum. Google is always worth a quick search
www.google.de/search?as_q=arduino+demo+KY-028

This forum is meant to help people to ehlp themself
So whenever you have a question about programming with the Arduino-IDE add the word "arduino" to the google-search and google will come up with usefuls links in minimum 80% of all cases.

If you look up the links and have specific questions - now these questions are the right ones to ask here.

Your initial question is just a more diplomatic word for

"can somebody write down a tutorial for me that explains how to program my sensor"

best regards Stefan

You can't measure temperature with a KY-028 module. The pot sets a temperature at which the digital output switches from LOW to HIGH. You want a KY-013 module for reading the temperature. Even better is a DS18B20 (OneWire interface) or a TMP36 (analog interface)

The analog interface returns a numeric value that depends on the temperature and the potentiometer's position. Since analog output pin is directly connected to the potentiometer it isn't possible to use the Steinhart-Hart equation to calculate the temperature as as we did with the KY-013, we can only use this value to measure relative changes in temperature.