Added the pinModes private array and basis of read mode.