class LED¶
The LED object controls the color of the led in manual mode.
WARNING: When the LED object is used the automatic status indication using the LED is disabled.
Methods¶
-
LED.
colour
([colour]) → integer¶ Get or set the colour of the led. When no parameter is given the current colour is returned as integer value.
colour
Can be one of the following strings or integers:blue
(0)green
(1)cyan
(2)red
(3)purple
(4)yellow
(5)white
(6)
-
LED.
off
()¶ Turn the LED off.
-
LED.
on
()¶ Turn the LED on, to it’s previous colour.
-
LED.
toggle
()¶ Toggle the LED between on and off. The LED remembers it’s previous colour when toggled on/off.
Example¶
The following code shows an example with the LED switching between 2 colors.
import omc048
import time
led = omc048.LED()
while 1:
led.colour('blue')
time.sleep(1)
led.colour('red')
time.sleep(0.5)