Skip to content

Commit 4599017

Browse files
committed
libs/m5ui/led.py: Remap the brightness range.
Signed-off-by: lbuque <[email protected]>
1 parent 022ec6f commit 4599017

File tree

4 files changed

+286
-189
lines changed

4 files changed

+286
-189
lines changed

docs/en/m5ui/led.rst

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -119,40 +119,6 @@ M5LED
119119
120120
led_0.set_color(color)
121121
122-
.. py:method:: set_brightness(brightness)
123-
124-
Set the brightness of the LED.
125-
126-
:param int brightness: Brightness value, range: 80 ~ 255 (80 = dark, 255 = light).
127-
:return: None
128-
129-
UiFlow2 Code Block:
130-
131-
|set_brightness.png|
132-
133-
MicroPython Code Block:
134-
135-
.. code-block:: python
136-
137-
led_0.set_brightness(brightness)
138-
139-
.. py:method:: get_brightness()
140-
141-
Get the brightness of the LED.
142-
143-
:return: The brightness value of the LED.
144-
:rtype: int
145-
146-
UiFlow2 Code Block:
147-
148-
|get_brightness.png|
149-
150-
MicroPython Code Block:
151-
152-
.. code-block:: python
153-
154-
brightness = led_0.get_brightness()
155-
156122
.. py:method:: set_pos(x, y)
157123
158124
Set the position of the LED.

0 commit comments

Comments
 (0)