based on Arduino OneWire lib at http://www.pjrc.com/teensy/td_libs_OneWire.html version 2.2