Forum / Guestbook




dld Wed 12 Jun 2019 at 12:14:03
Arduino i2c LCD backlight control with LDR

-
Arduino i2c LCD backlight control with LDR

in darkness lcd backlight can be screaming annoying brigth
auto adjust backlight intensity with an LDR

  lcd.begin(20, 4);
  lcd.setBacklightPin(3,HIGH);             // HIGH is OFF i2c control of backlight OFF
                                           // we control backlight from output D9 PWM 
                                           // Arduino i2c LCD BACKLIGHT CONTROL
int val = analogRead(0); // A0 LDR input 0...1023
val = map(val, 0, 1023, 20, 255); // map scale LDR to PWM
analogWrite(9, val); // D9 PWM output 20...255 solder wire to SMD transtistor 1 base

Serial LCD I2C backpack Module–PCF8574 i2c i/o expander
base of background light transistor connected to PWM output pin ~ D9
light control from i2c is still working => but turn it off in the code=> we control light from PWM ~ D9
others solder a wire to pin7 P3 PCF8574 ic but i think its easyer on the transistor
http://ict-bits.blogspot.com/2015/03/modding-lcd1602-i2ciic-adapter-board-to.html




some do i2c LCD backligth intensity manual adjust with a potmeter on lcd backligth jumper
some connect an LDR to LCD backlight jumper, it works but i was not happy with given light intensity



End of Message, Thanks For Viewing! ☺
Tip: if your watching on your phone or tablet ⁝ add / save to homescreen and you get a nice icon its Free!
Tip: on your computer or laptop do not forget to bookmark this page its Free!
BookMark ShortCut Keys press ctrl+d on your keyboard




-

-

Reply to this Message







POLL / VOTE
Did you like this Page id=295 ?

NO:         YES:




   


Design a Bit like ForumOne 4.0 WayBack 1999 ©
Always Read the Small print?!



http://forum.luberth.com - - http://www.luberth.com/forum/

NO COOKIES !?

thanks for your support
Thank You!




Co2 FootPrint WebServer



                         My Cheap Chinese Friend Ali     
Copyright Luberth Dijkman 2018 ... 2019




GoodBye Galaxy!