Price: ~5$
4 line display with PCF8574T - I/O expander for I2C-bus - two-wire
bidirectional (serial clock (SCL), serial data (SDA))
Arduino Library required: LiquidCrystal_I2C.h
Download library: https://github.com/johnrickman/LiquidCrystal_I2C
Put the files in Documents -> Arduino -> libraries
Wire connections:
- 5V and GND to corresponding
- the marked ones SDA, SCL on the end of the digital pins
- or the analog pins A4 (SDA) A5 (SCL)
Arduino Code:
#include <LiquidCrystal_I2C.h>If you have more devices on the I2C buss you can change the address by soldering the A0, A1 OR A2 connection on the PCF8574T board.
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight();
lcd.clear();
lcd.setCursor (0,3); // first parameter its the line 0,1,2,3 - second character position 0-20
lcd.print("Hello World");
}
void loop() {
}
List of special characters : https://learn.robotgeek.com/getting-started/59-lcd-special-characters.html
To display a special character : lcd.print((char)228);
Contract and Backlight
- In case you don't see nothing on the screen, use a screwdriver and adjust the blue potentiometer on the back.
- The backlight on/off is controlled by the jumper
- jumper in place: backlight on
- jumper removed: backlight off
The backlight can also be controlled with software.
Use lcd.backlight(); to turn it on and lcd.noBacklight(); to turn it off.
Contract and Backlight
- In case you don't see nothing on the screen, use a screwdriver and adjust the blue potentiometer on the back.
- The backlight on/off is controlled by the jumper
- jumper in place: backlight on
- jumper removed: backlight off
The backlight can also be controlled with software.
Use lcd.backlight(); to turn it on and lcd.noBacklight(); to turn it off.
No comments:
Post a Comment