Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
title permalink redirect_from
Examples on how to use GPIO using mraa library
/documentation/consumer/guides/mraa/gpio/
/documentation/ConsumerEdition/guides/mraa/gpio/

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.