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:
-
app
ObjectThe express application
Item Index
Methods
Methods
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
-
init
()
Initialize the sensors attached to the Arduino
irremote
-
data
Send an IR remote code
Parameters:
-
data
ObjectThe websocket data from the client
-
id
StringThe ID of the database entry from the IR to use
-
value
StringThe value to set (0 or 1)
-
led
-
data
Turn an LED light on
Parameters:
-
data
ObjectThe websocket data from the client
-
id
StringThe ID of the database entry from the LED to use
-
value
StringThe value to set (0 (off) or 1 (on))
-
rcswitch
-
data
Toggle an Arduino port
Parameters:
-
data
ObjectThe websocket data from the client
-
id
StringThe ID of the database entry from the RC switch to use
-
value
StringThe value to set (0 or 1)
-