title | permalink | redirect_from |
---|---|---|
Examples on how to use GPIO using mraa library |
/documentation/consumer/guides/mraa/gpio/ |
/documentation/ConsumerEdition/guides/mraa/gpio/ |
Following examples are provided in this repository to use GPIO using MRAA library.
- mraa_gpio.c
- mraa_gpio.cpp
- mraa_gpio.py
Usage:
Prerequisite: Debian running on 96Boards CE with libmraa installed
- Copy the examples to 96Boards CE
- Build the C/C++ examples:
$ gcc mraa_gpio.c -o gpio_c
$ g++ mraa_gpio.cpp -o gpio_c++
- Execute the examples:
$ sudo ./gpio_c
$ sudo ./gpio_c++
$ sudo python mraa_gpio.py
Expected Behaviour:
Toggles GPIO23 and GPIO24 on Low Speed expansion header.