"Useless code"
Yes, not needed, but then again, it does document things ![]()
If you used the internet pull-up resistors, you would need:
 pinMode(pin_A1, INPUT_PULLUP);
 pinMode(pin_B1, INPUT_PULLUP);
 pinMode(pin_A2, INPUT_PULLUP);
 pinMode(pin_B2, INPUT_PULLUP);
 pinMode(pin_A3, INPUT_PULLUP);
 pinMode(pin_B3, INPUT_PULLUP);