This is a cache of https://www.96boards.org/documentation/consumer/guides/mraa/gpio/. It is a snapshot of the page at 2024-10-31T01:44:41.792+0000.
Examples on how to use GPIO using mraa library - 96Boards

Examples on how to use GPIO using mraa library

Following examples are provided in this repository to use GPIO using MRAA library.

  1. mraa_gpio.c
  2. mraa_gpio.cpp
  3. 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.