Go Down

Topic: Converting DS18B20 output to integer value (Read 857 times) previous topic - next topic

Phil125

Was wondering how to convert the DS18B20 output to integer value.  For use with the Guino graphvalue.

Nick_Pyner

I think you just call the variable "int"

Krodal

#2
Jan 08, 2013, 08:26 am Last Edit: Jan 08, 2013, 08:28 am by Krodal Reason: 1
If you use the OneWire library, the zip file contains example code for the DS18B20
http://www.pjrc.com/teensy/td_libs_OneWire.html

Here is Arduino page for the OneWire library. Also with that example:
http://playground.arduino.cc/Learning/OneWire

Phil125

I'm having no problem getting the Thermometor to work.  Its getting it to work with the guino gui that is giving me fits.  Tells me its not an INT and gets an error.

Nick_Pyner


I'm having no problem getting the Thermometor to work.  Its getting it to work with the guino gui that is giving me fits.  Tells me its not an INT and gets an error.


The DS18B20's natural inclination is to deliver data to two decimal points.

If you declare data to be int, it will be an int. If you don't, it won't.

Klink is using DS18B20 with int  and I guess his method is what you want.

Go Up