Have you found the auto-format button in the IDE yet? (ctrl T) your code because if the indentation makes it hard for this noob to C+ very hard to read...
That having been said. Do you have a pull-up on the one wire bus line, recommended is 4K7 or lower depending on conditions and wire length?
Doc