Hcsr04 Constructors
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.
Overloads
Hcsr04(Int32, Int32, PinNumberingScheme) |
Creates a new instance of the HC-SCR04 sonar. |
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.
public Hcsr04 (int triggerPin, int echoPin, System.Device.Gpio.PinNumberingScheme pinNumberingScheme = System.Device.Gpio.PinNumberingScheme.Logical);
new Iot.Device.Hcsr04.Hcsr04 : int * int * System.Device.Gpio.PinNumberingScheme -> Iot.Device.Hcsr04.Hcsr04
Public Sub New (triggerPin As Integer, echoPin As Integer, Optional pinNumberingScheme As PinNumberingScheme = System.Device.Gpio.PinNumberingScheme.Logical)
Parameters
- triggerPin
- Int32
Trigger pulse input.
- echoPin
- Int32
Trigger pulse output.
- pinNumberingScheme
- PinNumberingScheme
Pin Numbering Scheme
Applies to
Hcsr04(GpioController, Int32, Int32, Boolean)
Creates a new instance of the HC-SCR04 sonar.
public Hcsr04 (System.Device.Gpio.GpioController gpioController, int triggerPin, int echoPin, bool shouldDispose = true);
public Hcsr04 (System.Device.Gpio.GpioController? gpioController, int triggerPin, int echoPin, bool shouldDispose = true);
new Iot.Device.Hcsr04.Hcsr04 : System.Device.Gpio.GpioController * int * int * bool -> Iot.Device.Hcsr04.Hcsr04
Public Sub New (gpioController As GpioController, triggerPin As Integer, echoPin As Integer, Optional shouldDispose As Boolean = true)
Parameters
- gpioController
- GpioController
GPIO controller related with the pins
- triggerPin
- Int32
Trigger pulse input.
- echoPin
- Int32
Trigger pulse output.
- shouldDispose
- Boolean
True to dispose the Gpio Controller
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