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,22 @@
SoftwareWire hd44780 examples
==================================
These examples require that the SoftwareWire library be installed.
The SoftwareWire library can be installed using the IDE library manager.
SoftwareWire provides a Wire compatable library that allows the user to
configure pins for the SDA and SCL signals.
While it offers additional flexibility, it will not be as fast as using the
dedicated i2c h/w inside the microcontroller.
These examples use the hd44780 library hd44780_I2Cexp i/o class using
SoftwareWire instead of the Wire library.
Note: using a software Wire library is not necessary on the esp8266 platform as the wire library on that platform already provides a mechanims to change the pins used for i2c.
WARNING:
The SoftWareWire developers made a major change to the library June 2018
which is in the subsequent 1.5.1 release that causes it be unusable by
the hd44780 library.
Until this change is backed out, you will not be able to use
SoftWareWire beyond version 1.5.0 with the hd44780 library.

View File

@@ -0,0 +1,38 @@
// ----------------------------------------------------------------------------
// LCDiSpeed - LCD Interface Speed test for hd44780 hd44780_I2Cexp i/o class
// using SoftwareWire instead of Wire
// ----------------------------------------------------------------------------
// This sketch is a wrapper sketch for the hd44780 library example LCDiSpeed.
// 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/LCDiSpeed/LCDiSpeed.ino
// From IDE:
// [File]->Examples-> hd44780/hd44780examples/LCDiSpeed
//
#include <SoftwareWire.h>
// Check for "new" SoftwareWire that breaks things
#if defined(TwoWire_h)
#error incompatible version of SoftwareWire library (use version 1.5.0)
#endif
const int sda=SDA, scl=SCL; // use same pins as h/w i2c
SoftwareWire Wire(sda,scl);
#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h> // include i/o class header
// declare the lcd object
hd44780_I2Cexp lcd; // auto locate and autoconfig interface pins
// tell the hd44780 sketch the lcd object has been declared
#define HD44780_LCDOBJECT
// include the hd44780 library LCDiSpeed sketch source code
#include <examples/hd44780examples/LCDiSpeed/LCDiSpeed.ino>

View File

@@ -0,0 +1,45 @@
// ----------------------------------------------------------------------------
// LCDiSpeed - LCD Interface Speed test for hd44780 hd44780_I2Cexp i/o class
// using SoftwareWire instead of Wire
// ----------------------------------------------------------------------------
// This sketch is a wrapper sketch for the hd44780 library example LCDiSpeed.
// 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/LCDiSpeed/LCDiSpeed.ino
// From IDE:
// [File]->Examples-> hd44780/hd44780examples/LCDiSpeed
//
#include <SoftwareWire.h>
// Check for "new" SoftwareWire that breaks things
#if defined(TwoWire_h)
#error incompatible version of SoftwareWire library (use version 1.5.0)
#endif
const int sda=SDA, scl=SCL; // use same pins as h/w i2c
SoftwareWire Wire(sda,scl);
#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h> // include i/o class header
#if ARDUINO < 157
#error "This sketch Requires Arduino 1.5.7 or higher"
#endif
// NOTE: uses API that only works on IDE 1.5.7 and up
#define WIRECLOCK 400000L // tell hd44780 example to use this i2c clock rate
// declare the lcd object
hd44780_I2Cexp lcd; // auto locate and autoconfig interface pins
// tell the hd44780 sketch the lcd object has been declared
#define HD44780_LCDOBJECT
// include the hd44780 library LCDiSpeed sketch source code
#include <examples/hd44780examples/LCDiSpeed/LCDiSpeed.ino>