the-raspberry-pi-guy / lcd

This repository contains all of the code for interfacing with a 16x2 Character I2C LCD Display. This accompanies my YouTube tutorial here: https://www.youtube.com/watch?v=fR5XhHYzUK0
186 stars 107 forks source link

FIX BACKLIGHT -fix #69 #70

Closed Jumitti closed 11 months ago

Jumitti commented 11 months ago

The BACKLIGHT function is very useful but it has a bug. Each update of the LCD screen resets the BACKLIGHT value to ON. So we cannot have a permanent display without backlight. I fixed the problem. The default display is with backlight. You can configure this with lcd_backlight as before. If you do lcd_blacklight(1) then it will be lit. If it is 0 it will be turned off. I added security, if you put any number other than 1 or 0 then it will necessarily be on.

There are a lot of commits but because I'm also working on another project and I'm doing a lot of testing, sorry.