/*
* 1602 LCD Sample with ShiftLCD
* https://github.com/Chris--A/ShiftLCD_Fixed
*
* 74HC595-----1602LCD-----WeMos
*
GND ---- GND
*
VCC ---- 5V
*
VE ---- Variable resistor
* QH ----- RS
*
R/W ---- GND
* QG ----- EN
* QD ----- D4
* QC ----- D5
* QB ----- D6
* QA ----- D7
*
LED+ ---- 5V
*
LED- ---- GND
*
SER
---- D0(GPIO_16)
*
RCLK
---- D5(GPIO_14)
*
SRCLK
---- D6(GPIO_12)
*
*/
#include <ShiftLCD.h>
// initialize the library with the numbers of the
interface pins
// SerialDataIn, ShiftClock, LatchClock
ShiftLCD lcd(16, 12, 14);
void setup() {
// set up the LCD's number of rows and columns:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting
begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}
|