Microcontroller › PIC › required code for timer › It’s very easy if you are
February 14, 2016 at 9:14 am
#13703
Participant
It's very easy if you are using arduino. Just seach around and you will find code. If you are programming AVR controller or 8051 in C refer datasheet of sensor. YOu need to give signal to sensor to start sending ultrasonic pulse and it returns square wave output. calculate it's time using Timer/Counter and use formula to get distance. YOu will find formula in datasheet of sensor.