public static Pin getPin(int pinNumber) { for (Pin pin : Pin.values()) { if (pin.getValue() == pinNumber) return pin; } return null; }