Hcsr04 Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
HC-SR04 - Ultrasonic Ranging Module
public class Hcsr04 : IDisposable
[System.Device.Model.Interface("HC-SR04 - Ultrasonic Ranging Module")]
public class Hcsr04 : IDisposable
type Hcsr04 = class
interface IDisposable
[<System.Device.Model.Interface("HC-SR04 - Ultrasonic Ranging Module")>]
type Hcsr04 = class
interface IDisposable
Public Class Hcsr04
Implements IDisposable
- Inheritance
-
Hcsr04
- Attributes
- Implements
Constructors
Hcsr04(GpioController, Int32, Int32, Boolean) |
Creates a new instance of the HC-SCR04 sonar. |
Hcsr04(Int32, Int32, PinNumberingScheme) |
Creates a new instance of the HC-SCR04 sonar. |
Properties
Distance |
Gets the current distance, usual range from 2 cm to 400 cm. |
Methods
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
TryGetDistance(Length) |
Try to gets the current distance, , usual range from 2 cm to 400 cm |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for