How to convert these values into Celsius? I tried scripts with the OneWire and DallasTemperature libraries while using a digital pin, but I get value -127. Example of script: KY-001 Temperature Sensor Module - ArduinoModulesInfo
-127 means not connected.
The DS18B20 has output in celcius, no conversion required. Use the sketch in your link, not the rubbish in your post. Nanos and Unos are the same.
Your wiring appears to be kosher, if it isn't the sensor will get very hot but might survive. Your problem may simply be a bad breadboard.
You're missing the pull-up resistor from the output to Vcc and your sketch is for an analog sensor. Add the pull-up and run the example sketch for the DallasTemperature 1-Wire.
My point is that OP is obviously not knowledgeable enough to make the leap from your schematic to hooking up their breakout board correctly so you should do the work of mapping to the correct pins for them.
Right! If you have used Multimeter for mapping, then you are correct in post #7.
I have different breakout board (DS1307, Fig-2) containging DS18B20; but, the Pin numbers-vs-signals (Fig-1) of the sensor are:
PIn-1 (Leftmost) : GND
Pin-2 (Middle): DQ (Signal)
Pin-3 (Rightmost): VDD (3.3V)
I mixed up, I was using this sensor while reading a tutorial that was using an analog sensor... Thank you for correcting me.
So, now I changed to pin D2, and used the script according to KY-001 Temperature Sensor Module - ArduinoModulesInfo
On the sketch of the url it shows that the VCC is connected to 5V, however I am providing 3.3V. I still get the value of -127 and the LED in the module is not blinking. Should I connect the VCC to VBUS instead of 3.3V?
I am a bit confused with the schematic, previously you shared that R (2), the middle pin, is VCC, from this latest schematic looks like the middle pin is the data.
That image is analogous to a picture of the chip itself. If you hold the chip (DS18B20) with the flat side toward you, DQ is the center pin. You are thinking about your circuit board which has the orientation different. Pay attention to the pin names, DQ(Output), Vcc, GND, when you are hooking it up.
Add a 4.7k resistor from the blue wire to 3.3V. Connect Vcc to 3.3V too. They are using a different board than yours and it is running off 5V. Don't connect to 5V on your board as that will damage your board.
I'm probably confusing you as I'm explaining through use of device data sheet information and schematic diagrams and you are evidently used to working from pictures of prototyping breadboards. Maybe someone else can post a Fritzing pictogram using the components you have.
I would encourage you to study device data sheets and learn the engineering language of schematic diagrams if you are interested in progressing in this field. Your use of a learning kit implies that you want to learn.