"I think the problem is because you are not using Interrupts.
I worked with it on AVR ATMEL ATMEGA8535 8Bit MCU and it worked well.
I'm now working on Texas Instruments MSP430f169 but Last night I did the perfect mistake I burnt the sensor :-)
I gave…"