Pages: [1]   Go Down
Author Topic: Converting DS18B20 output to integer value  (Read 614 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 30
Posts: 1682
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you just call the variable "int"
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1010
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: January 08, 2013, 02:28:48 am by Krodal » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 30
Posts: 1682
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: