Arduino Class
Arduino Plugin. This plugin is able to control an Arduino that is attached to the USB port of the Raspberry PI
Constructor
Arduino
-
app
Parameters:
-
appObjectThe express application
Item Index
Methods
Methods
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
-
init
()
Initialize the sensors attached to the Arduino
irremote
-
data
Send an IR remote code
Parameters:
-
dataObjectThe websocket data from the client
-
idStringThe ID of the database entry from the IR to use
-
valueStringThe value to set (0 or 1)
-
led
-
data
Turn an LED light on
Parameters:
-
dataObjectThe websocket data from the client
-
idStringThe ID of the database entry from the LED to use
-
valueStringThe value to set (0 (off) or 1 (on))
-
rcswitch
-
data
Toggle an Arduino port
Parameters:
-
dataObjectThe websocket data from the client
-
idStringThe ID of the database entry from the RC switch to use
-
valueStringThe value to set (0 or 1)
-
