replaced digitalWrite with bare pin writes