Header banner
Revain logoHome Page
Eric Surabhi photo
1 Level
824 Review
42 Karma

Review on πŸ–₯️ Enhanced Arduino Compatible Serial LCD Module - 20x4 Blue with White Backlight by Eric Surabhi

Revainrating 1 out of 5

Arduino Help Code Sample

Really nice. The available documentation and sample code was terrible, but they ended up putting it all together. I hope the following Arduino code example will help you all: /* NKC Electronics 20x4 Serial LCD test 20x4 serial LCD pinout for serial communication UARTpin 1: RXpin 2: GNDpin 3: +5V pin 1 connect to Arduino digital pin 4 pin 2 connect to Arduino GND , connect pin 3 to Arduino +5VRead more:[.] */#include <SoftwareSerial.h>// Since the LCD does not send any data back to the Arduino we only need to define txPi#define txPin 4 // White wire from serial LCD screenconst int LCDdelay = 10; // conservative, 2 really works SoftwareSerial LCD(0, txPin);void lcdPosition(int row, int col) { LCD.write(0xFE); // LCD command flag.write((col + row*64 + 128)); // Position Delay(LCDdelay); } /* void lcdPositionLine1() { LCD.write(0xFE); // command flag LCD.write(0x45); LCD.write(0x00); delay(LCDdelay); } */ void lcdPositionLine2() { LCD.write(0xFE); // command flag LCD.write(0x45); LCD.write(0x40); delay(LCDdelay); } void lcdPositionLine3() { LCD.write(0xFE); // command flag LCD.write(0x45); LCD.write(0x14); delay(LCDdelay); } void lcdPositionLine4() { LCD.write(0xFE); // command flag LCD.write(0x45); LCD.write(0x54); delay(LCDdelay); } void clearLCD() { LCD.write(0xFE); // command flag LCD.write(0x51); // Delete command. delay(LCDdelay); } void serCommand() { // general function to call command flag to issue all other commands LCD.write(0xFE); } void setLCCDContrast() { LCD.write(0xFE); // command flag LCD.write(0x52); LCD.record(40); // value from 1 to 50 (50 is the highest contrast) delay(LCDdelay); } void setLCDBrightness() { LCD.write(0xFE); // command flag LCD.write(0x53); LCD.record(5); //Value from 1 to 8 delay(LCDdelay); } void setup() { Serial.begin(57600); PinMode(txPin, EXIT); lcd.start(9600); //lcdPosition(0,0); clearLCD(); setLCDContrast(); setLCDBrightness(); LCD.print("Hello line 1"); LCDPositionRow2(); LCD.print("W33333333333333rrrrrrrrrrrrddddddddd"); LCDPositionLine3(); LCD.print("Hot press");}void loop(){}

Pros
  • Decent performance
Cons
  • Other