API Docs for: 0.0.1
Show:

Gpio Class

Gpio Plugin. Can access the GPIO on the Raspberry PI

Constructor

Gpio

(
  • app
)

Parameters:

  • app Object

    The express application

Item Index

Methods

api

(
  • req
  • res
)

API functions of the GPIO Plugin

Parameters:

  • req Object

    The request

  • res Object

    The response

beforeRender

(
  • items
  • callback
)

Manipulate the items array before render

Parameters:

  • items Array

    An array containing the items to be rendered

  • callback Function

    The callback method to execute after manipulation

    • err String

      null if no error occured, otherwise the error

    • result Object

      The manipulated items

parse

()

Parse GPIO the ports that are used as input and send the result to the client websocket

toggle

(
  • data
)

Toggle a GPIO port

Parameters:

  • data Object

    The websocket data

    • id String

      The ID of the database entry

    • value String

      The value to set