15 December 2021

Product reference: https://s.click.aliexpress.com/e/_DmDdEGH

An error where 2 lines out of 4 are having a white background. There is an easy solution for having this problem where 1 and 3 lines are showing white blocks. The lcd is actually 2 lines of 40 characters. Giving this information to LiquidCrystal library fixes the problem.

Source code viewer
  1. #include <LiquidCrystal.h>
  2.  
  3. // ...
  4.  
  5. #define LCD_HEIGHT 2
  6. #define LCD_WIDTH 40
  7.  
  8. // ...
  9.  
  10. void setup() {
  11. // ...
  12. lcd.begin(LCD_WIDTH, LCD_HEIGHT);
  13. // ...
  14. }
Programming Language: C++