PwmPin
PwmPin
PwmPin
PwmPin
Class
Definition
Represents a single PWM pin on the system.
public : sealed class PwmPin : IPwmPin, IClosablepublic sealed class PwmPin : IPwmPin, IDisposablePublic NotInheritable Class PwmPin Implements IPwmPin, IDisposable// You can use this class in JavaScript.
- Attributes
Windows 10 requirements
| Device family |
Windows IoT Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Devices.DevicesLowLevelContract (introduced v1)
|
Properties
Controller Controller Controller Controller
Gets the PWM controller in use by this pin.
public : PwmController Controller { get; }public PwmController Controller { get; }Public ReadOnly Property Controller As PwmController// You can use this property in JavaScript.
The controller.
IsStarted IsStarted IsStarted IsStarted
Gets the started state of the pin.
public : PlatForm::Boolean IsStarted { get; }public bool IsStarted { get; }Public ReadOnly Property IsStarted As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the PWM has started on this pin, otherwise false.
Methods
Close() Close() Close() Close()
Closes current connection to the pin, and makes pin available to be opened by others.
public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
Dispose() Dispose() Dispose() Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()
GetActiveDutyCyclePercentage() GetActiveDutyCyclePercentage() GetActiveDutyCyclePercentage() GetActiveDutyCyclePercentage()
Retrieves the duty cycle percentage for this pin.
public : double GetActiveDutyCyclePercentage()public double GetActiveDutyCyclePercentage()Public Function GetActiveDutyCyclePercentage() As double// You can use this method in JavaScript.
Returns
double
double
double
double
The duty cycle percentage, between 0.0 and 1.0.
SetActiveDutyCyclePercentage(Double) SetActiveDutyCyclePercentage(Double) SetActiveDutyCyclePercentage(Double) SetActiveDutyCyclePercentage(Double)
Sets the duty cycle percentage for this pin.
public : void SetActiveDutyCyclePercentage(double dutyCyclePercentage)public void SetActiveDutyCyclePercentage(Double dutyCyclePercentage)Public Function SetActiveDutyCyclePercentage(dutyCyclePercentage As Double) As void// You can use this method in JavaScript.
Parameters
- dutyCyclePercentage
- double Double Double Double
The desired duty cycle percentage, represented as a value between 0.0 and 1.0.
Start() Start() Start() Start()
Starts the PWM on this pin.
public : void Start()public void Start()Public Function Start() As void// You can use this method in JavaScript.