public class Light
extends java.lang.Object
Constructor and Description |
---|
Light(int port)
Creates a Light on the given port
|
Light(edu.wpi.first.wpilibj.Solenoid s)
Creates a Light with an existing Solenoid object
|
Modifier and Type | Method and Description |
---|---|
void |
blink(double sec)
Makes this Light blink on and off every X amount of seconds.
|
void |
enable()
Turns on this Light.
|
boolean |
isActive()
Checks if this light is doing anything.
|
void |
stop()
Turns off this Light and disables any activities it was doing.
|
public Light(edu.wpi.first.wpilibj.Solenoid s)
s
- The port which the light is plugged in.public Light(int port)
port
- The port on the PCM where the light is plugged in.public boolean isActive()
public void stop()
public void enable()
public void blink(double sec)
sec
- How many seconds this Light should spend on and off each.