anishkgt:
void loop() {
pinAState = digitalRead(PinA);
if ((PinALastState == LOW) && (pinAState == HIGH))
{
// (... counter stuff ...)
Serial.print (digitalRead (PinA)) ; Serial.print (",") ; Serial.println (digitalRead (PinB)) ;
//Serial.println(Counter);
}
You have put that line inside the "if ((PinALastState == LOW) && (pinAState == HIGH)) {}"
so it is normal that it only logs when pinA goes high.
But at least you can see that pinB is sometimes low and sometimes high when this happens,
presumably/hopefully depending on the turn direction.