Go Down

Topic: Shutdown Button (Read 1 time) previous topic - next topic

iKinkyxD

Hello There

i was wondering if i were able to add a button to my Arduino Duemilanove on 1 of the Digital pins
and make it shutdown some of the others ?

For example im trying to shutdown my lcd, and i want a button to turn it on and off.

and maybe add a potentiometer for the brightness / Contrast.

Any idea ?

Thanks in advance

magagna

No problem. Connect another pin to a transistor, and that transistor to the power for your LCD. If you Google "arduino transistor" you'll find a ton of tutorials; here's one:

http://art511.wordpress.com/works-in-progress/how-to-use-a-transistor-as-a-switch/

As far as the potentiometers for brightness / contrast -- most LCDs have pot connections for contrast adjust so you won't need the Arduino there. For brightness you could either connect the pot directly to the LCD's backlight or you could connect the backlight to a PWM pin on your Arduino and adjust it in your program.

Good luck!
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

iKinkyxD

Thanks for your quick reply !!

But i was wondering if i could just add a button to a digital pin and maybe put some code in that tells the
arduino to close those pins, og stop the output ?


magagna

Hi, I'm sorry but I don't understand.

Can you add a button to a digital pin? Yes, that is easy.

Can you put some code in that tells the arduino to close the pins? Yes, but close what pins? Do you mean the pins you use for the LCD? Yes you can turn those off but isn't the LCD power line run directly to the Arduino power?
http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

iKinkyxD

Thats exactly what i mean, by turning some digital pins off so the lcd wont display anything but the rest of the system runs as usually.
But maybe just add a button to the powerline andthe arduino, would that be easier ?

Go Up