
This experiment uses the PIC12F675 and the HC-S04 ultrasonic distance sensor utilizing three LEDs (Red, Yellow, and Green) to indicate, respectively, a distance of less than 10 cm, between 10 and 30 cm, and more than 30 cm. In this case, there is no requirement to compute the exact distance to determine if it falls within specific ranges, such as being greater than 10, less than 30, or exceeding these values. Instead, you simply need to measure and compare the elapsed time corresponding to each of these distance thresholds.
Documentation:
#pic12f675 #hcs04 #ultrasonic #microchip