Temp sensor issues

When trying to validate my temp sensor using following the only out put i get is constantly repeated start OWire in the serial monitor cant see what i am doing wrong

Serial.println(“Start OWire”);
if ( !oWire.search(addr))
{
Serial.print(“No more addresses.\n”);
oWire.reset_search();
delay(250);
return;
}

Serial.print(“R=”);
for( i = 0; i < 8; i++)
{
Serial.print(addr*, HEX);*

  • Serial.print(" ");*

  • }*

  • if ( OneWire::crc8( addr, 7) != addr[7])*

  • {*

  • Serial.print(“CRC is not valid!\n”);*

  • return;*

  • }*

  • if ( addr[0] == 0x10)*

  • {*

  • Serial.print(“Sensor is a DS18S20 family device.”);*

  • //not doing anything different for now.*

  • }*

  • else if (addr[0] == 0x28)*

  • {*

  • Serial.print(“Sensor is a DS18B20 family device”);*

  • //not doing anything different for now.*

  • }*

  • else*

  • {*

  • Serial.print(“Sensor is family code unknown, code is not set up for this, returning…”);*

  • return;*

  • }*

Show the whole code (not just an excerpt), something might have gone wrong before entering that part.

And include your code into code tags (the ‘#’ button in the post form) to make it readable and especially to prevent the server from interpreting things like

Serial.print(addr[i], HEX);

to show up like

Serial.print(addr, HEX);

The meaning is a bit different :).