Hello! It's almost impossible to go through your entire code. Did you read the datasheet of the sensor? Can you use GPIO interrupts coupled with a timer to get distance reading? You can have a look at reference code at and port the same. Teja
↧