Hi
I've got one of these in my box of tricks and the backlight appears to be hardwired between +5V and GND with a physical switch. The problem is when I mount this to a panel the backlight switch is recessed so not easy to access, and I'd like to set this up so I can turn off the display to save battery power but still have it able to be backlit for night viewing. And in the case of a warning situation I'd like to flash the backlight as an additional alert.
Because it's a shield I suspect I might need to desolder that switch and perhaps replace it with some headers to control the backlight with an Arduino digital pin and likely a transistor. Before I go hacking it up, am I on the right track?
Thanks
Geoff
I'm not exactly sure which lcd keypad you have, as there are several different versions
which are wired up differently.
Some have a physical switch, for the backlight but still can be controlled in software.
If you are lucky yours is this way.
Does yours look like this:
http://emartee.com/product/42054/Arduino%20Keypad%20LCD%20Shield%20V2.0
And use these pins for LCD control:
// initialize the library with the numbers of the interface pins
// lcd(RS, E, d4, d5, d6, d7)
LiquidCrystal lcd( 8, 9, 4, 5, 6, 7);
(This is the board I have)
They have a transistor wired up to Arduino pin 10 to control the backlight.
There is pullup on the base of the transistor and the switch is between the LCD and transistor.
This means that when the switch is off the LCD backlight is off.
When the switch is on, the LCD backlight is controlled by Arduino pin 10.
If Arduino pin 10 is high or an input, the LCD backlight will be on, and if Arduino pin 10 is low
the backlight is off.
You may want to see if Arduino pin 10 controls the backlight before you start hacking away on the
board.
--- bill
Bill,
That's the toy, and you've typed EXACTLY what I wanted to hear.
Thanks for the info. I'm sure glad I asked !
Geoff
Edit: PS, works a treat!