I have a DS18B20 temperature sensor that has worked fine for me with my UNO, but i recently picked up a MEGA for a bigger project.
When i noticed the readings were not coming back properly from the MEGA (186 degrees fahrenheit in a room that is 68) I ran the temperature test example sketch that is in the IDE, and sure enough the UNO comes back correct, and the MEGA is way off.
Any ideas what this might be? Anything i need to do to compile it differently for the mega (I am setting the Tools -> Board -> to MEGA 2560) ?
ver of dallas i am using "// Version 3.7.2 modified on Dec 6, 2011 to support Arduino 1.0"
ver of onewire (has this fine stub at the top)
Copyright (c) 2007, Jim Studt (original old version - many contributors since) The latest version of this library may be found at: http://www.pjrc.com/teensy/td_libs_OneWire.html Version 2.1: Arduino 1.0 compatibility, Paul Stoffregen Version 2.0: Modifications by Paul Stoffregen, January 2010: Modified to work with larger numbers of devices - avoids loop. Tested in Arduino 11 alpha with 12 sensors. 26 Sept 2008 -- Robin James http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238032295/27#27 Updated to work with arduino-0008 and to include skip() as of 2007/07/06. --RJL20 Modified to calculate the 8-bit CRC directly, avoiding the need for the 256-byte lookup table to be loaded in RAM. Tested in arduino-0010 -- Tom Pollard, Jan 23, 2008 Tom Pollard, email@example.com, contributed around May 20, 2008