public class PWM
extends Object
Constructor and Description |
---|
PWM(String channel)
Opens a PWM channel
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Disables the PWM output
|
void |
close()
Gives ownership of a channel back to the operating system
|
static String[] |
list()
Lists all available PWM channels
|
void |
set(float duty)
Enables the PWM output with a preset period of 1 kHz
|
void |
set(int period,
float duty)
Enables the PWM output
|
public PWM(String channel)
channel
- PWM channellist
public void clear()
public void close()
public static String[] list()
public void set(int period, float duty)
period
- cycle period in Hzduty
- duty cycle, 0.0 (always off) to 1.0 (always on)public void set(float duty)