webduino.module.IRRecv
The IRRecv Class.
Table of Contents
Constructor
webduino.module.IRRecv
-
board
-
pin
Parameters:
-
board
webduino.BoardThe board that the IRLed is attached to.
-
pin
IntegerThe pin that the IRLed is connected to.
Methods
addListener
-
type
-
listener
Add a listener for a certain type of event.
Parameters:
-
type
StringEvent type.
-
listener
FunctionEvent listener.
emit
-
type
-
object,...
Emit an event of certain type.
Parameters:
-
type
StringEvent type.
-
[object,...]
Object optionalEvent object(s).
listeners
-
type
Return the listener list bound to certain type of event.
Parameters:
-
type
StringEvnet 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:
-
type
StringEvent type.
-
listener
FunctionEvent 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:
-
type
StringEvent type.
removeListener
-
type
-
listener
Remove a listener for certain type of event.
Parameters:
-
type
StringEvent type.
-
listener
FunctionEvent listener.
setMaxListeners
-
n
Set maximum number of listeners that is allow to bind on an emitter.
Parameters:
-
n
NumberNumber of listeners.
Attributes
Events
IRRecvEvent.MESSAGE
Fires when receiving data.
IRRecvEvent.MESSAGE_ERROR
Fires when error occured while receiving data.