Drivers
LCD1602
The LCD1602
driver is used to drive LCD1602 display modules.
Where to buy
https://www.aliexpress.com/item/1005006100081942.html
How to wire
The module has 16 pins.
- VSS - GND
- VDD - +5V
- V0 - >500 ohm resistor, connected to GND
- RS - Any available GPIO pin
- RW - GND
- E - Any available GPIO pin
- D0 - Leave disconnected
- D1 - Leave disconnected
- D2 - Leave disconnected
- D3 - Leave disconnected
- D4 - Any available GPIO pin
- D5 - Any available GPIO pin
- D6 - Any available GPIO pin
- D7 - Any available GPIO pin
- A - >500 ohm resistor, connected to +5V
- K - GND
Using the driver
Instantiate the driver using the static make()
function, passing a reference to each pin.
You can call the following methods on the driver:
Available methods
initialise
This should be called before interacting with the screen.
enableDisplay
Enables the display
invertDisplay
Inverts the colours of the display
showCursor
Shows the cursor
hideCursor
Hides the cursor
writeChar
Writes a single character to the display
clearDisplay
Clears the display
home
Moves the cursor to the beginning of the first line.
shiftLeft
Moves the cursor one position to the left
shiftRight
Moves the cursor one position to the right
setCursor
Moves the cursor to the specified row and column number
writeString
Writes the given string to the display.