first commit

This commit is contained in:
Jérôme Delacotte
2025-03-06 11:15:32 +01:00
commit 7b30d6e298
5276 changed files with 2108927 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
// ----------------------------------------------------------------------------
// LCDcharset - Display LCD character set for hd44780 hd44780_pinIO i/o class
// ----------------------------------------------------------------------------
// This sketch is a wrapper sketch for the hd44780 library example LCDcharset.
// Note:
// This is not a normal sketch and should not be used as model or example
// of hd44780 library sketches.
// This sketch is simple wrapper that declares the needed lcd object for the
// hd44780 library sketch.
// It is provided as a convenient way to run a pre-configured sketch for
// the i/o class.
// The source code for this sketch lives in hd44780 examples:
// hd44780/examples/hd44780examples/LCDcharset/LCDcharset.ino
// From IDE:
// [File]->Examples-> hd44780/hd44780examples/LCDcharset
//
#include <hd44780.h>
#include <hd44780ioClass/hd44780_pinIO.h>
// define the LCD geometry
#define LCD_COLS 16
#define LCD_ROWS 2
// declare Arduino pins used for LCD functions
// and the lcd object
// Note: this can be with or without backlight control:
// without backlight control:
// note that ESP8266 based arduinos must use the Dn defines rather than
// raw pin numbers.
#if defined (ARDUINO_ARCH_ESP8266)
const int rs=D8, en=D9, db4=D4, db5=D5, db6=D6, db7=D7; // esp8266 Lolin/Wemos D1 R1 (uno form factor)
#elif defined(ARDUINO_ARCH_ESP32)
// note: GPIO12 needs a pulldown resistor
const int rs=12, en=13, db4=17, db5=16, db6=27, db7=14; // esp32 espduino32 D1 R32 (uno form factor)
#else
const int rs=8, en=9, db4=4, db5=5, db6=6, db7=7; // for all other devices
#endif
hd44780_pinIO lcd(rs, en, db4, db5, db6, db7);
//with backlight control:
// backlight control requires two additional parameters
// - an additional pin to control the backlight
// - backlight active level which tells the library the level
// needed to turn on the backlight.
// note: If the backlight control pin supports PWM, dimming can be done
// using setBacklight(dimvalue);
//
// WARNING: some lcd keypads have a broken backlight circuit
// If you have a lcd keypad, it is recommended that you first run the
// LCDKeypadCheck sketch to verify that the backlight circuitry
// is ok before enabling backlight control.
// However, the hd44780_PinIO class will autodetect the issue and
// work around it in s/w. If the backlight circuitry is broken,
// dimming will not be possible even if the backlight pin supports PWM.
//
#if defined (ARDUINO_ARCH_ESP8266)
// esp8266 Lolin/Wemos D1 R1 (uno form factor)
//const int rs=D8, en=D9, db4=D4, db5=D5, db6=D6, db7=D7, bl=D10, blLevel=HIGH;
#elif defined(ARDUINO_ARCH_ESP32)
// esp32 espduino32 D1 R32 (uno form factor)
// note: GPIO12 needs a pulldown resistor
//const int rs=12, en=13, db4=17, db5=16, db6=27, db7=14, bl=5, blLevel=HIGH;
#else
//const int rs=8, en=9, db4=4, db5=5, db6=6, db7=7, bl=10, blLevel=HIGH;
#endif
//hd44780_pinIO lcd(rs, en, db4, db5, db6, db7, bl, blLevel);
// tell the hd44780 sketch the lcd object has been declared
#define HD44780_LCDOBJECT
// include the hd44780 library LCDcharset sketch source code
#include <examples/hd44780examples/LCDcharset/LCDcharset.ino>

View File

@@ -0,0 +1,71 @@
// ----------------------------------------------------------------------------
// LCDiSpeed - LCD Interface Speed test for hd44780 hd44780_pinIO i/o class
// ----------------------------------------------------------------------------
// This sketch is a wrapper sketch for the hd44780 library example.
// Note:
// This is not a normal sketch and should not be used as model or exmaple
// of hd44780 library sketches.
// This sketch is simple wrapper that declares the needed lcd object for the
// hd44780 library sketch.
// It is provided as a convenient way to run a pre-configured sketch for
// the i/o class.
// The source code for this sketch lives in the hd44780 examples.
// hd44780/examples/hd44780examples/LCDiSpeed/LCDiSpeed.ino
// From IDE:
// [File]->Examples-> hd44780/hd44780examples/LCDiSpeed
//
#include <hd44780.h>
#include <hd44780ioClass/hd44780_pinIO.h>
// declare Arduino pins used for LCD functions
// and the lcd object
// Note: this can be with or without backlight control:
// without backlight control:
// note that ESP8266 based arduinos must use the Dn defines rather than
// raw pin numbers.
#if defined (ARDUINO_ARCH_ESP8266)
const int rs=D8, en=D9, db4=D4, db5=D5, db6=D6, db7=D7; // esp8266 Lolin/Wemos D1 R1 (uno form factor)
#elif defined(ARDUINO_ARCH_ESP32)
// note: GPIO12 needs a pulldown resistor
const int rs=12, en=13, db4=17, db5=16, db6=27, db7=14; // esp32 espduino32 D1 R32 (uno form factor)
#else
const int rs=8, en=9, db4=4, db5=5, db6=6, db7=7; // for all other devices
#endif
hd44780_pinIO lcd(rs, en, db4, db5, db6, db7);
//with backlight control:
// backlight control requires two additional parameters
// - an additional pin to control the backlight
// - backlight active level which tells the library the level
// needed to turn on the backlight.
// note: If the backlight control pin supports PWM, dimming can be done
// using setBacklight(dimvalue);
//
// WARNING: some lcd keypads have a broken backlight circuit
// If you have a lcd keypad, it is recommended that you first run the
// LCDKeypadCheck sketch to verify that the backlight circuitry
// is ok before enabling backlight control.
// However, the hd44780_PinIO class will autodetect the issue and
// work around it in s/w. If the backlight circuitry is broken,
// dimming will not be possible even if the backlight pin supports PWM.
//
#if defined (ARDUINO_ARCH_ESP8266)
// esp8266 Lolin/Wemos D1 R1 (uno form factor)
//const int rs=D8, en=D9, db4=D4, db5=D5, db6=D6, db7=D7, bl=D10, blLevel=HIGH;
#elif defined(ARDUINO_ARCH_ESP32)
// esp32 espduino32 D1 R32 (uno form factor)
// note: GPIO12 needs a pulldown resistor
//const int rs=12, en=13, db4=17, db5=16, db6=27, db7=14, bl=5, blLevel=HIGH;
#else
//const int rs=8, en=9, db4=4, db5=5, db6=6, db7=7, bl=10, blLevel=HIGH;
#endif
//hd44780_pinIO lcd(rs, en, db4, db5, db6, db7, bl, blLevel);
// tell the hd44780 sketch the lcd object has been declared
#define HD44780_LCDOBJECT
// include the hd44780 library sketch source code
#include <examples/hd44780examples/LCDiSpeed/LCDiSpeed.ino>

View File

@@ -0,0 +1,56 @@
// ----------------------------------------------------------------------------
// LCDLibTest - LCD library test sketch for hd44780 hd44780_pinIO i/o class
// ----------------------------------------------------------------------------
// This sketch is a wrapper sketch for the hd44780 library example.
// Note:
// This is not a normal sketch and should not be used as model or exmaple
// of hd44780 library sketches.
// This sketch is simple wrapper that declares the needed lcd object for the
// hd44780 library sketch.
// It is provided as a convenient way to run a pre-configured sketch for
// the i/o class.
// The source code for this sketch lives in the hd44780 examples.
// hd44780/examples/hd44780examples/LCDlibTest/LCDlibTest.ino
// From IDE:
// [File]->Examples-> hd44780/hd44780examples/LCDlibTest
//
#include <hd44780.h>
#include <hd44780ioClass/hd44780_pinIO.h> // include i/o class header
// declare Arduino pins used for LCD functions
// and the lcd object
// Note: this can be with or without backlight control:
// without backlight control:
#if defined (ARDUINO_ARCH_ESP8266)
//const int rs=D8, en=D9, db4=D4, db5=D5, db6=D6, db7=D7; // esp8266 Lolin/Wemos D1 R1 (uno form factor)
#elif defined(ARDUINO_ARCH_ESP32)
// esp32 espduino32 D1 R32 (uno form factor)
// note: espduino32 GPIO12 needs a pulldown resistor
//const int rs=12, en=13, db4=17, db5=16, db6=27, db7=14;
#else
//const int rs=12, en=11, db4=5, db5=4, db6=3, db7=2; // IDE LiquidCrystal pins
//const int rs=8, en=9, db4=4, db5=5, db6=6, db7=7; // lcd keypad shield pins
#endif
//hd44780_pinIO lcd(rs, en, db4, db5, db6, db7);
#if defined (ARDUINO_ARCH_ESP8266)
// esp8266 Lolin/Wemos D1 R1 (uno form factor)
const int rs=D8, en=D9, db4=D4, db5=D5, db6=D6, db7=D7, bl=D10, blLevel=HIGH;
#elif defined(ARDUINO_ARCH_ESP32)
// esp32 espduino32 D1 R32 (uno form factor)
// note: GPIO12 needs a pulldown resistor
const int rs=12, en=13, db4=17, db5=16, db6=27, db7=14, bl=5, blLevel=HIGH;
#else
const int rs=8, en=9, db4=4, db5=5, db6=6, db7=7, bl=10, blLevel=HIGH;
#endif
hd44780_pinIO lcd(rs, en, db4, db5, db6, db7, bl, blLevel);
// tell the hd44780 sketch the lcd object has been declared
#define HD44780_LCDOBJECT
// include the hd44780 library sketch source code
#include <examples/hd44780examples/LCDlibTest/LCDlibTest.ino>

View File

@@ -0,0 +1,69 @@
// ----------------------------------------------------------------------------
// lcdproc - LCD library lcdproc wrapper sketch for hd44780_pinIO i/o class
// ----------------------------------------------------------------------------
// This sketch is a wrapper sketch for the hd44780 library example.
// Note:
// This is not a normal sketch and should not be used as model or exmaple
// of hd44780 library sketches.
// This sketch is simple wrapper that declares the needed lcd object for the
// hd44780 library sketch.
// It is provided as a convenient way to run a pre-configured sketch for
// the i/o class.
// The source code for this sketch lives in the hd44780 examples.
// hd44780/examples/hd44780examples/lcdproc/lcdproc.ino
// From IDE:
// [File]->Examples-> hd44780/hd44780examples/lcdproc
//
#include <hd44780.h>
#include <hd44780ioClass/hd44780_pinIO.h> // include i/o class header
// declare Arduino pins used for LCD functions
// and the lcd object
// Note: this can be with or without backlight control:
// without backlight control:
#if defined (ARDUINO_ARCH_ESP8266)
const int rs=D8, en=D9, db4=D4, db5=D5, db6=D6, db7=D7; // esp8266 Lolin/Wemos D1 R1 (uno form factor)
#elif defined(ARDUINO_ARCH_ESP32)
// note: GPIO12 needs a pulldown resistor
const int rs=12, en=13, db4=17, db5=16, db6=27, db7=14; // esp32 espduino32 D1 R32 (uno form factor)
#else
const int rs=8, en=9, db4=4, db5=5, db6=6, db7=7; // for all other devices
#endif
hd44780_pinIO lcd(rs, en, db4, db5, db6, db7);
//with backlight control:
// backlight control requires two additional parameters
// - an additional pin to control the backlight
// - backlight active level which tells the library the level
// needed to turn on the backlight.
// note: If the backlight control pin supports PWM, dimming can be done
// using setBacklight(dimvalue);
//
// WARNING: some lcd keypads have a broken backlight circuit
// If you have a lcd keypad, it is recommended that you first run the
// LCDKeypadCheck sketch to verify that the backlight circuitry
// is ok before enabling backlight control.
// However, the hd44780_PinIO class will autodetect the issue and
// work around it in s/w. If the backlight circuitry is broken,
// dimming will not be possible even if the backlight pin supports PWM.
//
#if defined (ARDUINO_ARCH_ESP8266)
// esp8266 Lolin/Wemos D1 R1 (uno form factor)
//const int rs=D8, en=D9, db4=D4, db5=D5, db6=D6, db7=D7, bl=D10, blLevel=HIGH;
#elif defined(ARDUINO_ARCH_ESP32)
// esp32 espduino32 D1 R32 (uno form factor)
// note: GPIO12 needs a pulldown resistor
//const int rs=12, en=13, db4=17, db5=16, db6=27, db7=14, bl=5, blLevel=HIGH;
#else
//const int rs=8, en=9, db4=4, db5=5, db6=6, db7=7, bl=10, blLevel=HIGH;
#endif
//hd44780_pinIO lcd(rs, en, db4, db5, db6, db7, bl, blLevel);
// tell the hd44780 sketch the lcd object has been declared
#define HD44780_LCDOBJECT
// include the hd44780 library sketch source code
#include <examples/hd44780examples/lcdproc/lcdproc.ino>