docs: added UART examples into Python docs.
[contrib/mraa.git] / src / python / docs / example.rst
index 6063f3b..4daf98c 100644 (file)
@@ -44,9 +44,9 @@ The I2c module module has a number of different ways of interacting with the
 i2c bus, including a number of overloaded read() calls and the writeReg()
 helper function.
 
-.. literalinclude:: ../../../examples/python/i2c_HMC5883.py
-  :prepend: x = mraa.I2c(0)
-  :start-after: x = mraa.I2c(0)
+.. literalinclude:: ../../../examples/python/bmp85.py
+  :prepend: x = m.I2c(0)
+  :start-after: x = m.I2c(0)
 
 .. literalinclude:: ../../../docs/i2c.txt
 
@@ -71,3 +71,23 @@ fairly simple in use.
   :prepend: import mraa
   :start-after: import mraa
 
+Uart
+====
+
+Uart is the Universal asynchronous receiver/transmitter interface in mraa.
+It allows the exposure of UART pins on supported boards, with basic
+configuration operations supported.
+
+Here's a simple pair of programs comprising a sender and receiver pair.
+
+Sender:
+
+.. literalinclude:: ../../../examples/python/uart_sender.py
+  :prepend: import mraa
+  :start-after: import mraa
+
+Receiver:
+
+.. literalinclude:: ../../../examples/python/uart_receiver.py
+  :prepend: import mraa
+  :start-after: import mraa