Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Need help with D18B20 temperature sensor


  • Please log in to reply
2 replies to this topic

#1 Larsey

Larsey

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 28 May 2014 - 02:42 PM

Has anyone got this to work? I've made the following connections:

 

- 5V to power

- Ground to ground

- Digital 5 to DQ

- 4.7k resistor between 5V and DQ

 

I've got the following source code: http://pastebin.com/L2AWV3KX , got that from https://www.ghielectronics.com/docs/16/onewire

 

The application outputs "Temperature: 0" - is my sensor broken? I've tried two different ones.

 

Image of the setup: http://bildr.no/view/dGdodGhJ



#2 Xtrophic

Xtrophic

    New Member

  • Members
  • Pip
  • 9 posts
  • LocationSweden

Posted 11 June 2014 - 07:09 PM

You might want to have a look at some code I wrote before. :) 

 

http://forums.netdui...pport-library/ 

 

 



#3 Xtrophic

Xtrophic

    New Member

  • Members
  • Pip
  • 9 posts
  • LocationSweden

Posted 11 June 2014 - 07:11 PM

I wrote some code last year for a simple support library for 1-wire operations. More specifically the temperature probe you are having issues with. 

 

A quick look at your code shows you are missing commands to properly read a temperature.

 

My code is available at:

http://forums.netdui...upport-library/






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.