A Java Class to Interface Ultrasonic Sensor (HC-SR04) with Raspberry Pi
I am working on an embedded system project (A Telepresence Robot) which the main program is written using Java. The single board computer we have used for this project is Raspberry Pi 3 model B with Raspbian OS. In order to detect and meaure distances to near by objects we have used few ultrasonic sensors. I had to write a Java class to interface the HC-SR04 ultrasonic sensor with the Raspberry Pi using GPIO pins. To controll the GPIO pins …