Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

MADS-NET/rpio_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rpio plugin for MADS

This is a pair of plugins provinding interfaces to Raspberry Pi GPIO pins using the libgpiod library. The plugin rpio_out allows setting GPIO pin values, while rpio_in allows reading GPIO pin values.

This plugin has been updated for MADS v2

Dependencies

  • libgpiod, version 1.6.x, install with sudo apt install libgpiod-dev

Supported platforms

Currently, the supported platforms are:

  • Linux

Installation

Linux:

cmake -Bbuild -DCMAKE_INSTALL_PREFIX="$(mads -p)"
cmake --build build -j4
sudo cmake --install build

INI settings

The plugin supports the following settings in the INI file:

[rpio_in]
chip_path = "/dev/gpiochip0"
offsets = [5, 15, 10, 12]
pulldown = true
event_mode = "none"   # options: none, rising, falling, both
period = 500          # in milliseconds
polling_timeout = 500 # in milliseconds

[rpio_out]
chip_path = "/dev/gpiochip0"

All settings are optional; if omitted, the default values are used.

NOTE: The rpio_out sink plugin expects a JSON object with the following format:

{
  "pins": {
    "10": 1,
    "12": 0
  }
}

Where the keys are the GPIO pin numbers (as strings!) and the values are either 0 or 1 (as integers).

Executable demo

Demo executables read and set GPIO pin values.


About

Raspberry-Pi GPIO interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors