From ff9fc5b53add9d6bae5389e7f410cd8bf30957df Mon Sep 17 00:00:00 2001 From: bitovod Date: Sat, 20 Jan 2024 16:10:10 +0100 Subject: [PATCH 1/2] Update LiquidCrystal.h --- src/LiquidCrystal.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/LiquidCrystal.h b/src/LiquidCrystal.h index f0630868..8159087c 100644 --- a/src/LiquidCrystal.h +++ b/src/LiquidCrystal.h @@ -13,6 +13,10 @@ #define LCD_FUNCTIONSET 0x20 #define LCD_SETCGRAMADDR 0x40 #define LCD_SETDDRAMADDR 0x80 +#define LCD_BRIGHT100 0x00 +#define LCD_BRIGHT75 0x01 +#define LCD_BRIGHT50 0x02 +#define LCD_BRIGHT25 0x03 // flags for display entry mode #define LCD_ENTRYRIGHT 0x00 @@ -61,6 +65,8 @@ class LiquidCrystal : public Print { void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS); + void bright (uint8_t brg) { command (LCD_FUNCTIONSET | _displayfunction | brg); } + void clear(); void home(); From 29950964d44d86aefd76740fd20500715859b67f Mon Sep 17 00:00:00 2001 From: bitovod Date: Sat, 20 Jan 2024 18:01:19 +0100 Subject: [PATCH 2/2] Update README.adoc --- README.adoc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.adoc b/README.adoc index a46cd034..875a5a8e 100644 --- a/README.adoc +++ b/README.adoc @@ -9,6 +9,22 @@ image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/ This library allows an Arduino board to control liquid crystal displays (LCDs) based on the Hitachi HD44780 (or a compatible) chipset, which is found on most text-based LCDs. +For using with VFD Futaba M242SD was added command for setting brightness: + +Usage: + +lcd.bright(LCD_BRIGHT100); // set brightness to 100% + +lcd.bright(LCD_BRIGHT75); // set brightness to 75% + +lcd.bright(LCD_BRIGHT50); // set brightness to 50% + +lcd.bright(LCD_BRIGHT25); // set brightness to 25% + +Datasheet: https://www.mouser.com/datasheet/2/921/Futaba-06-11-2019-Futaba_VFD_Modules-1602274.pdf + + + For more information about this library please visit us at https://www.arduino.cc/en/Reference/{repository-name}