Go Down

Topic: When to write pin high/low? (Read 341 times) previous topic - next topic

Riccarr

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


holmes4

you only write to change its state.

Mark

fungus


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.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

robtillaart

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

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy