When to write pin high/low?

Hello

Basic question.

During the course of looping my program and performing digitalWrites to pins, if I write a HIGH to a pin so that it turns on a transistor, do I need to keep writing HIGH each time through loop to maintain the pin in its HIGH state thus keeping the transistor switched on?

Or do I need to only write to the pin when I want to change its state?

Thanks
Eric

you only write to change its state.

Mark

Riccarr:
During the course of looping my program and performing digitalWrites to pins, if I write a HIGH to a pin so that it turns on a transistor, do I need to keep writing HIGH each time through loop to maintain the pin in its HIGH state thus keeping the transistor switched on?

No.

but it doesn't hurt either - except for a few CPU cycles burned