White LED¶

Description |
A white LED (Light Emitting Diode). Outputs a white light. |
Usage |
Can be set with a digital output. Control brightness by changing or pulsing the power. |
Voltage Range |
2 - 5V |
Interface Type |
Analog / Digital Output |
Example Usage |
from microbit import *
# turn the LED on
pin0.write_digital(1)
# wait 1 second
sleep(1000)
# turn the LED off
pin0.write_digital(0)
# turn the LED on dim
pin0.set_analog_period(1)
pin0.write_analog(511)
|