I was working with interfacing of hc sr04 ultrasonic sensor with lpc1768 so as to display the distance from an obstacle to the sensor on an LCD display in centimeters ..
there were no errors in the code, but distance is not being varied its showing always as 0 cm..
i could not find the problem.. i'm sure that sensor is in good condition
- 2 Contributors
- forum 1 Reply
- 376 Views
- 57 Minutes Discussion Span
- commentLatest Postby rubbermanLatest Post
Apr 12, 2019 In this tutorial we will be learning how to Interface Ultrasonic Sensor HC-SR04 with PIC microcontroller. The HC-SR04 is an ultrasonic sensor which can be used to measure distance anywhere between 2cm to 450cm (theoretically). This sensor has proved itself worthy by fitting into many projects which involves obstacles detection, distance. In this tutorial, we’ll create a distance meter using the ultrasonic sensor HC-SR04 with an Alphanumeric 16×2 LCD module. In a previous tutorial, we’ve discussed how HC-SR04 Ultrasonic sensor works and how to interface it with a microcontroller.
rubberman1,355
Interfacing Hc-sr04 With Pic16f877a In Dev C System
So, you expect us to analyze 200+ lines of code to find where your logic sucks? Review it yourself with a critical eye, and then post a smaller bit of code here if you still need help. Of course, 136 lines of this input is just data - what does it mean? In any case, just post the relevant data.