Show:
Extends webduino.Module

The IRLed Class.

IR LED (Infrared LED) is widely used for remote controls and night-vision cameras.

Constructor

webduino.module.IRLed
(
  • board
  • encode
)

Parameters:

  • board webduino.Board

    The board that the IRLed is attached to.

  • encode String

    Encode which IRLed used.

Methods

addListener
(
  • type
  • listener
)

Add a listener for a certain type of event.

Parameters:

  • type String

    Event type.

  • listener Function

    Event listener.

emit
(
  • type
  • object,...
)

Emit an event of certain type.

Parameters:

  • type String

    Event type.

  • [object,...] Object optional

    Event object(s).

listeners
(
  • type
)

Return the listener list bound to certain type of event.

Parameters:

  • type String

    Evnet type.

on
(
  • type
  • listener
)

Alias for EventEmitter.addListener(type, listener)

Parameters:

  • type String

    Event type.

  • listener Function

    Event listener.

once
(
  • type
  • listener
)

Add a one-time listener for a certain type of event.

Parameters:

  • type String

    Event type.

  • listener Function

    Event listener.

removeAllListeners
(
  • type
)

Remove all listeners of certain type.

Parameters:

  • type String

    Event type.

removeListener
(
  • type
  • listener
)

Remove a listener for certain type of event.

Parameters:

  • type String

    Event type.

  • listener Function

    Event listener.

send
(
  • code
)

Send IR code.

Parameters:

  • code String

    Hexadecimal String to send.

setMaxListeners
(
  • n
)

Set maximum number of listeners that is allow to bind on an emitter.

Parameters:

  • n Number

    Number of listeners.

updateEncode
(
  • code
)

Update code.

Parameters:

  • code String

    Hexadecimal to update.

Attributes

type

String readonly

Type of the module.