Skip to content

Commit cabbef5

Browse files
committed
Include sample example directly in the README.
1 parent cac0491 commit cabbef5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,15 @@ Or the following command to update an existing version:
9595
Usage Example
9696
=============
9797

98-
.. literalinclude:: ../examples/pio_uart_simpletest.py
99-
:caption: examples/pio_uart_simpletest.py
100-
:linenos:
98+
.. code-block:: python
99+
100+
import board
101+
import adafruit_pio_uart
102+
103+
uart = adafruit_pio_uart.UART(board.TX, board.RX)
104+
105+
uart.write(b"\x00")
106+
print(uart.read(1))
101107
102108
103109
Documentation

0 commit comments

Comments
 (0)