Pages: [1]   Go Down
Author Topic: Want to make my lcd to go to sleep when input isnt changed after 3 seconds  (Read 239 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I built an arduino project that changes a certain value via press buttons and displays it on a 16x2 character lcd
What i want to do is to send the screen to sleep if the input hasnt changed in three seconds
Is it possible? And if so how?
Logged

NSW Australia
Offline Offline
Faraday Member
**
Karma: 80
Posts: 3258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Presumably by "send the screen to sleep", you mean turn off the backlight.  There is little economy to be achieved by shutting down the actual LCD display driving circuit.

I would think at least five seconds would be more reasonable.  In any case, it is easy enough to do given that you are either using a backpack which provides control of the backlight, or a shield which does (bearing in mind the design fault described in one of the "sticky" threads here) or you are controlling it with a transistor of your own arrangement.

Your "loop" code if written correctly, would allow for a countdown timer which is continuously advanced to 3000 (or whatever value you decide on) beyond the current "millis()" value on any keypress, and when in the loop, that value is exceeded, the backlight is turned off.

If you need more description than that, it is your turn to post your code for review.   smiley-grin
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code will be uploaded soon
And say i have control of the backlight
Can you send me a link to where i can find the certain library i need to use or a tut that exsplaind the main idea
Understanding how to set backlight on and off with the mills()
Thanks
Logged

Pages: [1]   Go Up
Jump to: