summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/pyb.LED.rst
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-10-31 01:37:19 +0000
committerDamien George <damien.p.george@gmail.com>2014-10-31 01:37:19 +0000
commit88d3054ac072f9c73b0f3f045c59ba74f6730c1d (patch)
tree6db7851068908c0640b1ed306d6823871fd3d742 /docs/library/pyb.LED.rst
parent7c4445afe104631d5fe8e7401d50f40f205e35b9 (diff)
downloadmicropython-88d3054ac072f9c73b0f3f045c59ba74f6730c1d.tar.gz
micropython-88d3054ac072f9c73b0f3f045c59ba74f6730c1d.zip
docs: Import documentation from source-code inline comments.
The inline docs (prefixed with /// in .c files) have been converted to RST format and put in the docs subdirectory.
Diffstat (limited to 'docs/library/pyb.LED.rst')
-rw-r--r--docs/library/pyb.LED.rst36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/library/pyb.LED.rst b/docs/library/pyb.LED.rst
new file mode 100644
index 0000000000..7bd98092ae
--- /dev/null
+++ b/docs/library/pyb.LED.rst
@@ -0,0 +1,36 @@
+class LED --- LED object
+========================
+
+The LED object controls an individual LED (Light Emitting Diode).
+
+
+Constructors
+------------
+
+.. class:: pyb.LED(id)
+
+ Create an LED object associated with the given LED:
+
+ - ``id`` is the LED number, 1-4.
+
+
+Methods
+-------
+
+.. method:: led.intensity([value])
+
+ Get or set the LED intensity. Intensity ranges between 0 (off) and 255 (full on).
+ If no argument is given, return the LED intensity.
+ If an argument is given, set the LED intensity and return ``None``.
+
+.. method:: led.off()
+
+ Turn the LED off.
+
+.. method:: led.on()
+
+ Turn the LED on.
+
+.. method:: led.toggle()
+
+ Toggle the LED between on and off.