*/
public static byte getAPin(int analog_input,
BoardLayout layout) throws ParameterNotFoundException{
if (layout == BoardLayout.MiniLayout) {
if (analog_input < 0 || analog_input > 5)
throw new ParameterNotFoundException("Analog pin number out of range [0..5].");
return (byte)(AI0 + analog_input);
} else {
if (analog_input < 0 || analog_input > 15)
throw new ParameterNotFoundException("Analog pin number out of range [0..15].");
return (byte)(A0 + analog_input);
}
}