Overview
- Object ID : 5399 (2026-05-28 23:55:29)
- Author : Jon McPhalen
- Content : Code
- Microcontroller : Propeller 1
- Language : SPIN
- Category : Sensor
- Licence : MIT
- Tags : distance, HC-SR04, jonnymac, ultrasonic
Content
Object and demo code for the HC-SR04 ultrasonic sensor. Uses positive pulse measurement mode of the P1 CTRx module. Methods in the object allow the user to select CTRA or CTRB to handle the measurement, and return distance in microseconds, centimeters, or inches.