bricknil.sensor.light¶
All LED/light output devices
Classes¶
LED (name[, port, capabilities]) |
Changes the LED color on the Hubs. |
Light (name[, port, capabilities]) |
Connects to the external light. |
Members¶
-
class
bricknil.sensor.light.
LED
(name, port=None, capabilities=[])[source]¶ Bases:
bricknil.sensor.peripheral.Peripheral
Changes the LED color on the Hubs:
@attach(LED, name='hub_led')
self.hub_led.set_output(Color.red)
-
class
bricknil.sensor.light.
Light
(name, port=None, capabilities=[])[source]¶ Bases:
bricknil.sensor.peripheral.Peripheral
Connects to the external light.
Example:
@attach(Light, name='light')
And then within the run body, use:
await self.light.set_brightness(brightness)