Gpio Class
Gpio Plugin. Can access the GPIO on the Raspberry PI
Constructor
Gpio
(
-
app
Parameters:
-
app
ObjectThe express application
Item Index
Methods
Methods
api
(
-
req
-
res
API functions of the GPIO Plugin
Parameters:
-
req
ObjectThe request
-
res
ObjectThe response
beforeRender
(
-
items
-
callback
Manipulate the items array before render
Parameters:
-
items
ArrayAn array containing the items to be rendered
-
callback
FunctionThe callback method to execute after manipulation
-
err
Stringnull if no error occured, otherwise the error
-
result
ObjectThe 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
ObjectThe websocket data
-
id
StringThe ID of the database entry
-
value
StringThe value to set
-