Gpio Class
Gpio Plugin. Can access the GPIO on the Raspberry PI
Constructor
Gpio
(
-
app
Parameters:
-
appObjectThe express application
Item Index
Methods
Methods
api
(
-
req -
res
API functions of the GPIO Plugin
Parameters:
-
reqObjectThe request
-
resObjectThe response
beforeRender
(
-
items -
callback
Manipulate the items array before render
Parameters:
-
itemsArrayAn array containing the items to be rendered
-
callbackFunctionThe callback method to execute after manipulation
-
errStringnull if no error occured, otherwise the error
-
resultObjectThe 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:
-
dataObjectThe websocket data
-
idStringThe ID of the database entry
-
valueStringThe value to set
-
