File: led.rst

package info (click to toggle)
python-periphery 2.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 424 kB
  • sloc: python: 3,496; makefile: 21
file content (37 lines) | stat: -rw-r--r-- 602 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
LED
====

Code Example
------------

.. code-block:: python

    from periphery import LED
    
    # Open LED "led0" with initial state off
    led0 = LED("led0", False)
    # Open LED "led1" with initial state on
    led1 = LED("led1", True)
    
    value = led0.read()
    led1.write(value)
    
    # Set custom brightness level
    led1.write(led1.max_brightness / 2)
    
    led0.close()
    led1.close()

API
---

.. autoclass:: periphery.LED
    :members:
    :undoc-members:
    :show-inheritance:

.. autoclass:: periphery.LEDError
    :members:
    :undoc-members:
    :show-inheritance: