Added output pin type detection