webduino.module.IRRecv
The IRRecv Class.
Table of Contents
Constructor
webduino.module.IRRecv
-
board -
pin
Parameters:
-
boardwebduino.BoardThe board that the IRLed is attached to.
-
pinIntegerThe pin that the IRLed is connected to.
Methods
addListener
-
type -
listener
Add a listener for a certain type of event.
Parameters:
-
typeStringEvent type.
-
listenerFunctionEvent listener.
emit
-
type -
object,...
Emit an event of certain type.
Parameters:
-
typeStringEvent type.
-
[object,...]Object optionalEvent object(s).
listeners
-
type
Return the listener list bound to certain type of event.
Parameters:
-
typeStringEvnet type.
off
()
Stop detection.
on
-
callback -
errorCallback
Start detection.
Parameters:
-
[callback]Function optionalDetection callback.
-
[errorCallback]Function optionalError callback while Detection.
once
-
type -
listener
Add a one-time listener for a certain type of event.
Parameters:
-
typeStringEvent type.
-
listenerFunctionEvent listener.
receive
-
callback -
errorCallback
Start detection.
Parameters:
-
[callback]Function optionalDetection callback.
-
[errorCallback]Function optionalError callback while Detection.
removeAllListeners
-
type
Remove all listeners of certain type.
Parameters:
-
typeStringEvent type.
removeListener
-
type -
listener
Remove a listener for certain type of event.
Parameters:
-
typeStringEvent type.
-
listenerFunctionEvent listener.
setMaxListeners
-
n
Set maximum number of listeners that is allow to bind on an emitter.
Parameters:
-
nNumberNumber of listeners.
Attributes
Events
IRRecvEvent.MESSAGE
Fires when receiving data.
IRRecvEvent.MESSAGE_ERROR
Fires when error occured while receiving data.