Overview
- Object ID : 5401 (2026-05-28 23:54:14)
- Author : Jon McPhalen
- Content : Code
- Microcontroller : Propeller 2
- Language : SPIN2
- Category : Sensor
- Licence : MIT
- Tags : distance, HC-SR04, jonnymac, ultrasonic
Content
Object and demo code for the HC-SR04 ultrasonic sensor. Measures return pulse with a P2 smart pin (P_HIGH_TICKS mode). Methods in the object allow the user to return distance in microseconds, centimeters, or inches.