Board.CreatePwmChannel Method
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
CreatePwmChannel(Int32, Int32, Int32, Double) |
Creates a PWM channel for the default pin assignment |
CreatePwmChannel(Int32, Int32, Int32, Double, Int32, PinNumberingScheme) |
Creates a PWM channel |
CreatePwmChannel(Int32, Int32, Int32, Double)
Creates a PWM channel for the default pin assignment
public System.Device.Pwm.PwmChannel CreatePwmChannel (int chip, int channel, int frequency = 400, double dutyCyclePercentage = 0.5);
member this.CreatePwmChannel : int * int * int * double -> System.Device.Pwm.PwmChannel
Public Function CreatePwmChannel (chip As Integer, channel As Integer, Optional frequency As Integer = 400, Optional dutyCyclePercentage As Double = 0.5) As PwmChannel
Parameters
- chip
- Int32
Chip number. Usually 0
- channel
- Int32
Channel on the given chip
- frequency
- Int32
Initial frequency
- dutyCyclePercentage
- Double
Initial duty cycle
Returns
A pwm channel instance
Applies to
CreatePwmChannel(Int32, Int32, Int32, Double, Int32, PinNumberingScheme)
Creates a PWM channel
public System.Device.Pwm.PwmChannel CreatePwmChannel (int chip, int channel, int frequency, double dutyCyclePercentage, int pin, System.Device.Gpio.PinNumberingScheme pinNumberingScheme);
member this.CreatePwmChannel : int * int * int * double * int * System.Device.Gpio.PinNumberingScheme -> System.Device.Pwm.PwmChannel
Public Function CreatePwmChannel (chip As Integer, channel As Integer, frequency As Integer, dutyCyclePercentage As Double, pin As Integer, pinNumberingScheme As PinNumberingScheme) As PwmChannel
Parameters
- chip
- Int32
Chip number. Usually 0
- channel
- Int32
Channel on the given chip
- frequency
- Int32
Initial frequency
- dutyCyclePercentage
- Double
Initial duty cycle
- pin
- Int32
The pin number for the pwm channel. Used if not hardwired (i.e. on the Raspi, it is possible to use different pins for the same PWM channel)
- pinNumberingScheme
- PinNumberingScheme
The pin numbering scheme for the pin
Returns
A pwm channel instance