ChipKit program conversion Arduino

Hi all i made a program for ChipKit using it's ethernet shield. Everything works perfectly with ChipKit, now i'm converting the code to Arduino language, but the program is not working well... please could you help me?

Schematics: http://www.codeshared.altervista.org/cloud/users/dnviti/Arduino_Projects/Temperature_Sensor_bb.jpg

Program: codebender

Schematics are old, the latest version of the program is written using a dht11 sensor, not an LM35, but you can use every sensor you like to test the code.