Class: IOBank

IOBank

Constructor

new IOBank()

a collection of pins
Source:

Methods

addPin(pin)

add a pin. If a pin with the same number already exists, it will be overwritten and their STATE_CHANGED event cleared.
Parameters:
Name Type Description
pin yasp.Pin
Source:

addPins(pins)

add multiple pins
Parameters:
Name Type Description
pins Array.<yasp.Pin>
Source:
See:

getJSON() → {Array}

get the json representations of all pins as an array
Source:
See:
Returns:
Type
Array

getPin(nr) → {yasp.Pin}

get the pin object with number nr
Parameters:
Name Type Description
nr Number
Source:
Returns:
Type
yasp.Pin

removePin(nr)

removes a pin and resets its STATE_CHANGED function
Parameters:
Name Type Description
nr Number
Source:

setStateChangedEvent(func)

sets the handler, which is called when one of the pin-states changes
Parameters:
Name Type Description
func function
Source: