Code checking before programming

larryd:
An 'unsigned char' is a 'byte'.

Since 'brightnessRed' will not be larger than 255, this could also be 'byte'

Keeping a variable's 'type' small helps save RAM, however, I suppose in this small project RAM usage will not be a problem.

It’s just good practise.

'byte' and 'char' one byte
'int' two bytes.
'long' four bytes

BTW
pinMode(pin_A1, INPUT); <———<<<< at power up, inputs are already set to INPUT

Great to know! Thank you for the help.

So basically all of this,

  pinMode(pin_A1, INPUT);
  pinMode(pin_B1, INPUT);
  pinMode(pin_A2, INPUT);
  pinMode(pin_B2, INPUT);
  pinMode(pin_A3, INPUT);
  pinMode(pin_B3, INPUT);

Useless code