Can I change this line???
if (pc19 != "off") pinMapping.Add(new { Config = pc19, Address = "PC19", Pin = ConnectorPin.CB3_CN8Pin05, Direction = (pc19 == "out" ? PinDirection.Output : PinDirection.Input) });
to
if (pd4 != "off") pinMapping.Add(new { Config = pd4, Address = "PD4", Pin = ConnectorPin.CB2_U14Pin05, Direction = (pd4 == "out" ? PinDirection.Output : PinDirection.Input) });