2021-06-07 13:56:08 +02:00
|
|
|
#
|
|
|
|
# Create LED's with different brightness and color
|
|
|
|
#
|
2021-02-08 09:53:03 +01:00
|
|
|
|
|
|
|
# Create a LED and switch it OFF
|
|
|
|
led1 = lv.led(lv.scr_act())
|
2021-06-07 13:56:08 +02:00
|
|
|
led1.align(lv.ALIGN.CENTER, -80, 0)
|
2021-02-08 09:53:03 +01:00
|
|
|
led1.off()
|
|
|
|
|
|
|
|
# Copy the previous LED and set a brightness
|
2021-06-07 13:56:08 +02:00
|
|
|
led2 = lv.led(lv.scr_act())
|
|
|
|
led2.align(lv.ALIGN.CENTER, 0, 0)
|
|
|
|
led2.set_brightness(150)
|
|
|
|
led2.set_color(lv.palette_main(lv.PALETTE.RED))
|
2021-02-08 09:53:03 +01:00
|
|
|
|
|
|
|
# Copy the previous LED and switch it ON
|
2021-06-07 13:56:08 +02:00
|
|
|
led3 = lv.led(lv.scr_act())
|
|
|
|
led3.align(lv.ALIGN.CENTER, 80, 0)
|
|
|
|
led3.on()
|
|
|
|
|