i2c_scroll

Example of the component esp-idf-lib/hd44780 v1.2.5
# Example for `hd44780` and `pcf8574` driver

An example to use `HD44780` LCD with `PCF8574` Remote 8-Bit I/O Expander for
I2C Bus.

## What it does

It prints "LEFT scroll" or "RIGHT scroll" to the LCD, scrolls the text, and
repeat.

## Wiring

In most cases, the `HD44780` module comes with a `PCF8574` module designed for
`HD44780`. The `PCF8574` module has pins for I2C and `hd44780`. In that case,
you simply connect two modules. The example assumes a typical configuration,
described below.

| `hd44780` | `PCF8574` |
|-----------|-----------|
| `RS`      | 0         |
| `E`       | 2         |
| `D4`      | 4         |
| `D5`      | 5         |
| `D6`      | 6         |
| `D7`      | 7         |
| `BL`      | 3         |

![Module schematics](../hd44780_i2c/i2c_lcd.png?raw=true)

Connect `SCL` and `SDA` pins on `PCF8574` module to the following pins with
appropriate pull-up resistors.

| Name | Description | Defaults |
|------|-------------|----------|
| `CONFIG_EXAMPLE_I2C_MASTER_SCL` | GPIO number for `SCL` | "5" for `esp8266`, "6" for `esp32c3`, "19" for `esp32`, `esp32s2`, and `esp32s3` |
| `CONFIG_EXAMPLE_I2C_MASTER_SDA` | GPIO number for `SDA` | "4" for `esp8266`, "5" for `esp32c3`, "18" for `esp32`, `esp32s2`, and `esp32s3` |

## Notes

The default I2C address of `PCF8574` is `0x27`, which can be modified under
`Example configuration` in `menuconfig`.

To create a project from this example, run:

idf.py create-project-from-example "esp-idf-lib/hd44780=1.2.5:i2c_scroll"

or download archive (~2.78 KB)