mraa: rename from maa to mraa
[contrib/mraa.git] / src / python / docs / example.rst
1 #######
2 Example
3 #######
4 Here are some examples of how to use pymraa, common convention is to import pymraa as mraa to keep it short but feel free to import it globally!
5
6 Hello GPIO
7 ==========
8
9 Here is the simplest Gpio program in pymraa.
10
11 .. literalinclude:: ../../../examples/python/hello_gpio.py
12   :prepend: import pymraa
13   :start-after: import pymraa
14
15 GPIO Interupt (isr)
16 ===================
17
18 The GPIO module allows you to set an interupt on a GPIO. This interupt is controlled by the mode that the 'edge' is in.
19
20 **Note:** Galileo Gen1 only supports EDGE_BOTH
21
22 .. literalinclude:: ../../../examples/python/hello_isr.py
23   :prepend: import pymraa as mraa
24   :start-after: import pymraa as mraa
25