Hi sir,
I am using keil, In program for trigger pin i am giving 10us of pulse as data sheet of ultrasonic sensor but it is not responding through echo pin, P1.7=trigger and P1.6 echo pin.
Here i am not getting the problem whether it is in circuit connection or in code, But the same connection which i am using for led blink and sending data serially its working fine, Problem is in ultrasonic.
What microcontroller are you using..?
Also it looks to me,reading from your program,that you are building a temperature sensing system for your home.Am I right..?
If not,then explain what are you trying to do through the program.