|
nodemcu驱动lcd1602跟arduino一模一样,只是3v3的供电比较弱,显示亮度暗。
nodemcu和lcd1602这样接线。
上传程序,
[mw_shl_code=arduino,true]#include <LiquidCrystal.h>
LiquidCrystal lcd(D3,D4,D5,D6,D7,D8);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16,2);
}
void loop() {
// put your main code here, to run repeatedly:
char h[]="xxm!I miss you! ";
for(int i=0;i<=15;i++)
{
lcd.setCursor(i,0);
lcd.print(h);
delay(500);
// Serial.println(h);
}
lcd.clear();
delay(3000);
}[/mw_shl_code]
|
|