protected void dispatchPinAnalogValueChangeEvent(Pin pin, double value) {
// if the pin listeners map contains this pin, then dispatch event
if (listeners.containsKey(pin)) {
// dispatch this event to all listener handlers
for (PinListener listener : listeners.get(pin)) {
listener.handlePinEvent(new PinAnalogValueChangeEvent(this, pin, value));
}
}
}