caf_rpi_gpio

0.4.0 • Public • Published

Caf.js

Co-design permanent, active, stateful, reliable cloud proxies with your web app or gadget.

See https://www.cafjs.com

Raspberry Pi Library for Accessing GPIO Pins

Build Status

This library provides access to GPIO pins in a Raspberry Pi. It runs in the device not in the cloud.

API

See {@link module:caf_rpi_gpio/proxy_iot_gpio}

Configuration Example

iot.json

See {@link module:caf_rpi_gpio/plug_iot_gpio}

{
        "module": "caf_rpi_gpio#plug_iot",
        "name": "gpio",
        "description": "Access to GPIO pins for this device.",
        "env" : {
            "maxRetries" : "$._.env.maxRetries",
            "retryDelay" : "$._.env.retryDelay",
            "gpiomem" : "process.env.GPIO_MEM||true",
            "mapping" : "process.env.MAPPING||physical",
            "allowMock" : "process.env.ALLOW_MOCK||true",
            "mockRootDir" : "process.env.MOCK_ROOT_DIR||/tmp/gpio"
        },
        "components" : [
            {
                "module": "caf_rpi_gpio#proxy_iot",
                "name": "proxy",
                "description": "Proxy to access GPIO pins",
                "env" : {
                }
            }
        ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i caf_rpi_gpio

Weekly Downloads

14

Version

0.4.0

License

Apache-2.0

Unpacked Size

44.9 kB

Total Files

17

Last publish

Collaborators

  • antlai