Arduino-LCD1602
2019/11
23
20:11
材料
面包板 x1
3脚电位器 x1
LCD 1602 x1
Arduino UNO x1
引脚符号说明
1 GND-接地
2 VCC-5V正极
3 V0- 对比度调整,接正极时对比度最弱
4 RS- 寄存器选择,1数据寄存器(DR),0指令寄存器(IR)
5 R/W-读写选择,1度,0写
6 EN -使能(enable)端,高电平读取信息,负跳变时执行指令
7~14 D0~D7 8位双向数据
15 BLA-背光正极
16 BLK-背光负极
#include <LiquidCrystal.h>
// 初始化针脚
const int rs = 3, en = 5, d4 = 10, d5 = 11, d6 = 12, d7 = 13;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup()
{
//设置LCD要显示的列数、行数,即2行16列
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("hello, world!");
lcd.setCursor(0, 1);
lcd.print("welcome!");
}
CopyRights: The Post by BY-NC-SA For Authorization,Original If Not Noted,Reprint Please Indicate From 老刘@开发笔记
Post Link: Arduino-LCD1602
Post Link: Arduino-LCD1602