API Docs for: 0.0.1
Show:

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 Object

    The express application

Item Index

Methods

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

init

()

Initialize the sensors attached to the Arduino

irremote

(
  • data
)

Send an IR remote code

Parameters:

  • data Object

    The websocket data from the client

    • id String

      The ID of the database entry from the IR to use

    • value String

      The value to set (0 or 1)

led

(
  • data
)

Turn an LED light on

Parameters:

  • data Object

    The websocket data from the client

    • id String

      The ID of the database entry from the LED to use

    • value String

      The value to set (0 (off) or 1 (on))

rcswitch

(
  • data
)

Toggle an Arduino port

Parameters:

  • data Object

    The websocket data from the client

    • id String

      The ID of the database entry from the RC switch to use

    • value String

      The value to set (0 or 1)