public final class LightDrivePWM
extends java.lang.Object
Constructor and Description |
---|
LightDrivePWM(edu.wpi.first.wpilibj.Servo bank1,
edu.wpi.first.wpilibj.Servo bank2)
Creates an instance of LightDriveCAN to control the LightDrive12 via PWM.
|
Modifier and Type | Method and Description |
---|---|
void |
SetColor(int ch,
java.awt.Color color)
Set the given channel's Color
|
void |
SetLevel(int ch,
int level)
Sets the raw pwm output value for a desired channel
|
void |
Update()
Send new data to LightDrive.
|
public LightDrivePWM(edu.wpi.first.wpilibj.Servo bank1, edu.wpi.first.wpilibj.Servo bank2)
bank1
- Servo object to be used for the first PWM output to control the LightDrivebank2
- Servo object to be used for the second PWM output to control the LightDrivepublic void Update()
public void SetColor(int ch, java.awt.Color color)
ch
- Int (1-4) representing the desired bank of channels to setcolor
- Color class representing the desired Colorpublic void SetLevel(int ch, int level)
ch
- Int (1-12) representing the desired channellevel
- Byte (0-255) representing the desired duty cycle scaled 0 to 255